Bug #77993 [NEW]: Wrong parse error for invalid hex literal on Windows

From: Date: Wed, 08 May 2019 18:45:38 +0000
Subject: Bug #77993 [NEW]: Wrong parse error for invalid hex literal on Windows
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220783@lists.php.net to get a copy of this message
From: theodorejb at outlook dot com Operating system: Windows 10 PHP version: 7.3.5 Package: *Compile Issues Bug Type: Bug Bug description:Wrong parse error for invalid hex literal on Windows Description: ------------ If a hex literal has an underscore (or other invalid character) between the "0x" and the digits, the error on Windows doesn't match the expected error. The error is correct on Linux, but not on the Windows version of PHP. Strangely, Windows produces the expected error (matching Linux) for binary literals, but not hex literals. Test script: --------------- 0x_10; Expected result: ---------------- Parse error: syntax error, unexpected 'x_10' (T_STRING) in %s on line %d Actual result: -------------- Parse error: Invalid numeric literal in %s on line %d -- Edit bug report at https://bugs.php.net/bug.php?id=77993&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77993&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77993&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77993&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77993&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77993&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77993&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77993&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77993&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77993&r=support Expected behavior: https://bugs.php.net/fix.php?id=77993&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77993&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77993&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77993&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77993&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77993&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77993&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77993&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77993&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77993&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77993&r=mysqlcfg

« previous php.bugs (#220783) next »