Bug #13610: heredoc: any chars (even white space) after closing ";" causes error
| From: | rprangnell at hotmail dot com | Date: | Tue, 09 Oct 2001 10:07:03 +0000 |
| Subject: | Bug #13610: heredoc: any chars (even white space) after closing ";" causes error | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-67594@lists.php.net to get a copy of this message | ||
From: rprangnell@hotmail.com
Operating system: Windows98
PHP version: 4.0.6
PHP Bug Type: Scripting Engine problem
Bug description: heredoc: any chars (even white space) after closing ";" causes error
Having carefully searching the bugs database and drawn a blank on this( I
made sure to include 'closed' and 'bogus' entries in my search!), I would
like to point out that the new 'heredoc' syntax (which is GREAT) has a
little bug that could prove troublesome as it is hard to spot. The bug is
that you can't put anything other than the 'return' character after the
semi-colon that closes the statement. Even a single white space character
after the semi-colon forces a parse error. This can be a poser, especially
if the user's editor can't display non-printing characters.
Typically, this kind of thing won't work:
$query = <<< SQL
SELECT parentID
FROM messages
WHERE msgID = $msgID
SQL; // Can't put a comment (or anything else) here!
I encountered the same bug with both the PWS and the Apache ISAPI module
version.
--
Edit bug report at: http://bugs.php.net/?id=13610&edit=1