Bug #71086 [Asn->Csd]: Invalid numeric literal parse error within highlight_string() function

From: Date: Fri, 11 Dec 2015 15:06:58 +0000
Subject: Bug #71086 [Asn->Csd]: Invalid numeric literal parse error within highlight_string() function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197795@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71086&edit=1 ID: 71086 Updated by: nikic@php.net Reported by: chris at xenforo dot com Summary: Invalid numeric literal parse error within highlight_string() function -Status: Assigned +Status: Closed Type: Bug Package: Scripting Engine problem Operating System: Ubuntu 14.04 x64 PHP Version: 7.0Git-2015-12-10 (Git) Assigned To: nikic 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=fd3ece8578326410ccd045332c57e6fec5a88bad Log: Fix bug #71086 Previous Comments: ------------------------------------------------------------------------ [2015-12-10 21:06:43] chris at xenforo dot com 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 this bug report at https://bugs.php.net/bug.php?id=71086&edit=1

« previous php.bugs (#197795) next »