Re: numbers getting changed (wrongly) with convert_to_long_ex()?

From: Date: Mon, 12 Jun 2000 06:29:34 +0000
Subject: Re: numbers getting changed (wrongly) with convert_to_long_ex()?
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-21080@lists.php.net to get a copy of this message
On Mon, 12 Jun 2000, Leon Breedt wrote: > Hi. > > This is my first attempt to hack PHP, so if I'm making any stupid > assumptions, I apologize... > > However, I'm having problems with adding on an ntohl() function. > It seems that when I pass the argument 4294967295 (max size of ulong) > to my ntohl() wrapper, some bits get lost or changed, as after a > convert_to_long_ex(), i'm left with 2147483648 in the lval (this > is when I cast the lval to an unsigned long value and do a debug > php_error() message. You are hitting a limit of Zend which supports only signed 32-bit integers (2^31 is exactly the number you quote). - Sascha

« previous php.dev (#21080) next »