Bug #76608 [NEW]: Heredoc end label should not require an additional trailing character

From: Date: Wed, 11 Jul 2018 01:01:24 +0000
Subject: Bug #76608 [NEW]: Heredoc end label should not require an additional trailing character
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216268@lists.php.net to get a copy of this message
From: mattacosta at gmail dot com Operating system: PHP version: 7.3.0alpha3 Package: Scripting Engine problem Bug Type: Bug Bug description:Heredoc end label should not require an additional trailing character Description: ------------ If a perfectly valid heredoc is not followed by an additional character, the reported error states that an end label was expected, even though it was present. This means that instead of removing the requirement for a trailing newline, it was in fact replaced by a requirement for any trailing character. Test script: --------------- // No trailing line. echo <<<LABEL hello world LABEL Expected result: ---------------- Parse error: syntax error, unexpected end of file, expecting ',' or ';' Actual result: -------------- Parse error: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or heredoc end (T_END_HEREDOC) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) -- Edit bug report at https://bugs.php.net/bug.php?id=76608&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76608&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76608&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76608&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76608&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76608&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76608&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76608&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76608&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76608&r=support Expected behavior: https://bugs.php.net/fix.php?id=76608&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76608&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76608&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76608&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76608&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76608&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76608&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76608&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76608&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76608&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76608&r=mysqlcfg

« previous php.bugs (#216268) next »