View Single Post
Old 09-08-2006, 07:58 AM   #278
bonusrobber
Junior Member
bonusrobber began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2006
I get
int(-6288256054)
int(-6288256054)
int(-6288256054)
int(-6288256054)

Host provider is bluehost and PHP 4.4.4 (cgi)
Linux 2.6.17-11_1.BHsmp #1 SMP Thu Aug 24 09:39:29 MDT 2006 x86_64 x86_64 x86_64 GNU/Linux

Not a single example here to fetch pr work there =(

Me
http://www.findmatch.org
100% Free dating & penpals service

Quote:
Originally Posted by AboutSledge
PHP Data Type Converting Bug.


<?php

//header("Content-Type: text/plain; charset=utf-8");

$n = -6288256054;
var_dump($n);

$a = intval($n);
var_dump($a);

$b = (int) $n;
var_dump($b);

settype($n,"int");
var_dump($n);

?>

============good==========
float(-6288256054)
int(-1993288758)
int(-1993288758)
int(-1993288758)


============bad=================

float(-6288256054)
int(-2147483648)
int(-2147483648)
int(-2147483648)

Last edited by bonusrobber; 09-08-2006 at 08:14 AM.
bonusrobber is offline   Reply With Quote