From: Derick Rethans Date: Sun, 7 Aug 2011 17:36:31 +0000 (+0000) Subject: - Fixed bug #55378: binary number literal returns float number though its value X-Git-Tag: php-5.4.0beta1~488 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ed828a89227b003abb437dc22347807ea6934c1;p=php - Fixed bug #55378: binary number literal returns float number though its value is enough small --- diff --git a/NEWS b/NEWS index 0da922fbb0..42c368f90a 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,14 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2011, PHP 5.4.0 Beta +- General improvements: + . Turn on html_errors by default again in php.ini-production like it was in + PHP 5.3, but only generate docref links when the docref_root INI setting is + not empty. +- Fixed bug #55378: Binary number literal returns float number though its value + is small enough. (Derick) -4 Aug 2011, PHP 5.4.0 Alpha 3 +04 Aug 2011, PHP 5.4.0 Alpha 3 - Added features: . Short array syntax, see UPGRADING guide for full details (rsky0711 at gmail . com, sebastian.deutsch at 9elements . com, Pierre) diff --git a/Zend/tests/binary-32bit.phpt b/Zend/tests/binary-32bit.phpt new file mode 100644 index 0000000000..4b87aded4f --- /dev/null +++ b/Zend/tests/binary-32bit.phpt @@ -0,0 +1,154 @@ +--TEST-- +testing binary literals +--INI-- +precision=14 +--SKIPIF-- + +--FILE-- + +--FILE-- +value.lval = strtol(bin, NULL, 2); zendlval->type = IS_LONG; return T_LNUMBER; diff --git a/Zend/zend_language_scanner.l b/Zend/zend_language_scanner.l index 73e22e209e..a5c7fd1833 100644 --- a/Zend/zend_language_scanner.l +++ b/Zend/zend_language_scanner.l @@ -1469,7 +1469,7 @@ NEWLINE ("\r"|"\n"|"\r\n") --len; } - if (len < SIZEOF_LONG * 2) { + if (len < SIZEOF_LONG * 8) { zendlval->value.lval = strtol(bin, NULL, 2); zendlval->type = IS_LONG; return T_LNUMBER;