Bug #77812 [Opn->Csd]: 7.3 Interactive shell won't digest 7.3 heredoc syntax

From: Date: Thu, 28 Mar 2019 00:11:20 +0000
Subject: Bug #77812 [Opn->Csd]: 7.3 Interactive shell won't digest 7.3 heredoc syntax
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220231@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77812&edit=1 ID: 77812 User updated by: bugs dot php dot net at ss dot st dot tc Reported by: bugs dot php dot net at ss dot st dot tc Summary: 7.3 Interactive shell won't digest 7.3 heredoc syntax -Status: Open +Status: Closed Type: Bug Package: Strings related Operating System: Linux (didn't try Win) PHP Version: 7.3.3 Block user comment: N Private report: N New Comment: Oh thank you so much. I didn't look there. Instead, was staring at https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc which doesn't even mention new syntax. Thanks again. Previous Comments: ------------------------------------------------------------------------ [2019-03-28 00:03:28] a at b dot c dot de This is the first entry listed under the "Backward Incompatible Changes" section of the 7.3 migration guide. http://www.php.net/manual/en/migration73.incompatible.php ------------------------------------------------------------------------ [2019-03-27 20:13:27] bugs dot php dot net at ss dot st dot tc Description: ------------ Old, pre-7.3 heredoc syntax works as expected in PHP 7.3 interactive shell: $ php7.3 -a Interactive shell php > echo <<<FOO <<< > bar <<< > FOO; bar Now let's try 7.3 heredoc syntax: $ php7.3 -a Interactive shell php > echo <<<FOO <<< > bar <<< > FOO; <<< > $ php7.3 -a Interactive shell php > print(<<<FOO <<< > xx <<< > FOO); <<< > $ php7.3 -a Interactive shell php > echo <<<FOO <<< > xxx <<< > FOO; <<< > FOO php > ; xxxPHP Warning: Use of undefined constant FOO - assumed 'FOO' (this will throw an Error in a future version of PHP) in php shell code on line 4 The latter example works well in PHP 7.2: $ php7.2 -a Interactive shell php > echo <<<FOO <<< > xxx <<< > FOO; <<< > FOO php > ; xxx FOO; php > ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77812&edit=1

« previous php.bugs (#220231) next »