Bug #71806 [Opn->Csd]: php_strip_whitespace() fails on some numerical values
| From: | nikic@php.net | Date: | Fri, 11 Mar 2016 21:46:46 +0000 |
| Subject: | Bug #71806 [Opn->Csd]: php_strip_whitespace() fails on some numerical values | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-199766@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71806&edit=1
ID: 71806
Updated by: nikic@php.net
Reported by: gregzem at inbox dot ru
Summary: php_strip_whitespace() fails on some numerical
values
-Status: Open
+Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: ANY
PHP Version: 7.0.4
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=02743f43c2de313e30320f2fb2d995937ce9881b
Log: Fixed bug #71806
Previous Comments:
------------------------------------------------------------------------
[2016-03-11 21:25:12] gregzem at inbox dot ru
Description:
------------
If the source contains digits starting with 0, php_strip_whitespace() fails to process the source
and produces the parser error.
<?php
echo 0987654321;
?>
This source will generate the following error:
PHP Parse error: Invalid numeric literal in testfile.php on line 2
Test script:
---------------
testfile.php
<?php
echo 0987654321;
?>
test.php:
<?php
$test = php_strip_whitespace('testfile.php');
?>
Expected result:
----------------
php_strip_whitespace processes the file without any errors.
Actual result:
--------------
php_strip_whitespace generates PHP Parse error: Invalid numeric literal in testfile.php on line 2
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71806&edit=1