Re: cvs: php-src(PHP_5_2) / NEWS /ext/json JSON_parser.c json.c /ext/json/tests pass001.1.phpt
| From: | Ilia Alshanetsky | 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:
Ilia Alshanetsky+ double d = zend_strtod(buf->c, NULL); + if (d > LONG_MAX) {Shouldn't it be d > LONG_MAX || d < -LONG_MAX?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/- int(4000000000000) + %s(4000000000000)