Bug #77812 [ReO->Csd]: Interactive mode does not recognize PHP 7.3-style heredoc closing identifier

From: Date: Fri, 23 Aug 2019 12:05:41 +0000
Subject: Bug #77812 [ReO->Csd]: Interactive mode does not recognize PHP 7.3-style heredoc closing identifier
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-222381@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 Updated by: cmb@php.net Reported by: bugs dot php dot net at ss dot st dot tc Summary: Interactive mode does not recognize PHP 7.3-style heredoc closing identifier -Status: Re-Opened +Status: Closed Type: Bug Package: Readline related Operating System: * PHP Version: 7.3 Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=03c7749dc8f40df8f41afffcdef4595ad43afe7f Log: Fix #77812: Interactive mode does not support PHP 7.3-style heredoc Previous Comments: ------------------------------------------------------------------------ [2019-08-21 11:45:17] cmb@php.net The following pull request has been associated: Patch Name: Fix #77812: Interactive mode does not support PHP 7.3-style heredoc On GitHub: https://github.com/php/php-src/pull/4590 Patch: https://github.com/php/php-src/pull/4590.patch ------------------------------------------------------------------------ [2019-08-17 15:54:00] cmb@php.net The following patch has been added/updated: Patch Name: fix-77812 Revision: 1566057240 URL: https://bugs.php.net/patch-display.php?bug=77812&patch=fix-77812&revision=1566057240 ------------------------------------------------------------------------ [2019-08-17 12:49:48] blackknight at iinet dot net dot au I've just had a look around and it might be a bit fiddly to fix. Around line 354 of ext/readline/readline_cli.c. Allowing whitespace between the start of line and the heredoc tag shouldn't be too difficult, but the new syntax also allows the tag to be followed by code other than just \n or ;\n - will need some way to distinguish END, $somethingElse); from ENDING inside the heredoc. ------------------------------------------------------------------------ [2019-08-17 12:22:53] requinix@php.net Looks like the fix will be to ext/readline's cli_is_valid_code(). ------------------------------------------------------------------------ [2019-08-17 12:19:02] requinix@php.net I've split the doc bug out into bug #78425, since this report has a fair bit of commentary about the interactive mode bug. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=77812 -- Edit this bug report at https://bugs.php.net/bug.php?id=77812&edit=1

« previous php.bugs (#222381) next »