Re: cvs: php-src(PHP_5_2) / NEWS /ext/json JSON_parser.c json.c /ext/json/tests pass001.1.phpt

From: Date: Wed, 13 Jun 2007 17:33:50 +0000
Subject: Re: cvs: php-src(PHP_5_2) / NEWS /ext/json JSON_parser.c json.c /ext/json/tests pass001.1.phpt
References: 1 2  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-44802@lists.php.net to get a copy of this message
The test is universal, on 64 bit machines you will get int because PHP int is actually a long. The -LONG_MAX is a good point though. On 13-Jun-07, at 1:11 PM, Stanislav Malyshev wrote:
+ double d = zend_strtod(buf->c, NULL); + if (d > LONG_MAX) {
Shouldn't it be d > LONG_MAX || d < -LONG_MAX?
-    int(4000000000000)
+    %s(4000000000000)
If it's 32-bit it's always float, no chance to get int(4000000000000) from PHP, so why %s? --Stanislav Malyshev, Zend Products Engineer stas@zend.com http://www.zend.com/
Ilia Alshanetsky

« previous php.cvs (#44802) next »