Bug #71086 [NEW]: Invalid numeric literal parse error within highlight_string() function

From: Date: Thu, 10 Dec 2015 21:06:44 +0000
Subject: Bug #71086 [NEW]: Invalid numeric literal parse error within highlight_string() function
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197777@lists.php.net to get a copy of this message
From: chris at xenforo dot com Operating system: Ubuntu 14.04 x64 PHP version: 7.0Git-2015-12-10 (Git) Package: Scripting Engine problem Bug Type: Bug Bug description:Invalid numeric literal parse error within highlight_string() function Description: ------------ I have reproduced this issue with PHP 7.0 stable and have since updated to: PHP 7.0.2-dev (cli) (built: Dec 9 2015 20:09:53) ( NTS ) If you test the script below, you will see a parse error, "Invalid numeric literal". Although, technically, the code used within highlight_string function below is indeed invalid, I don't believe this should actually manifest itself as a parse error. After all, you can throw pretty much anything in there, valid or invalid, and not otherwise get any problems, so a parse error here for this specific case seems unexpected. Test script: --------------- <?php $highlightedString = highlight_string("<?php \n 09;", true); var_dump($highlightedString); ?> Expected result: ---------------- The parse error should be suppressed. Actual result: -------------- ParseError: Invalid numeric literal -- Edit bug report at https://bugs.php.net/bug.php?id=71086&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71086&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71086&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71086&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71086&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71086&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71086&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71086&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71086&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71086&r=support Expected behavior: https://bugs.php.net/fix.php?id=71086&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71086&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71086&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71086&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71086&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71086&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71086&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71086&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71086&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71086&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71086&r=mysqlcfg

« previous php.bugs (#197777) next »