Home » PHP » PHP_Beautifier » Bug #1659
PHP_Beautifier destroys HEREDOC formatting
Details
| Submitted | 2004-06-16 19:47 UTC |
|---|---|
| From | cricket at djcricket dot com |
| Assigned | clbustos |
| Status | Bogus |
| Package | PHP_Beautifier |
| PHP Version | 5.0.0RC3 (Release Candidate 3) |
| OS | FreeBSD 4.10-STABLE |
| Roadmaps | (Not assigned) |
Comments
[2004-06-16 19:47 UTC] cricket at djcricket dot com
Description:
------------
HEREDOC strings with line returns are completely removed after running php_beautifier
Reproduce code:
---------------
$str = <<<EOS
This
is
a
string.
EOS;
Expected result:
----------------
$str = <<<EOS
This
is
a
string.
EOS;
Actual result:
--------------
$str = <<<EOS Thisisastring.EOS;
[2004-06-16 20:21 UTC] clbustos at entelchile dot net
I can't reproduce the bug. Please, follow the next points:
<ul>
<li>Verify that you have the latest release (0.0.7)</li>
<li>If the upload don't resolve the problem, please give the following information:</li>
<ul>
<li>Mode of use: command line, class</li>
<li>Original linefeed: \r, \n or \r\n</li>
<li>Options used for beautify</li>
</ul>
<li>If you can send me the script to clbustos ARROBA dotgeek DOT org, I could test the script and see what happened</li>
</ul>
[2004-06-17 00:35 UTC] cricket at djcricket dot com
The code i listed below does not cause the error, as I have learned. This will, however:
$str = <<<EOS This
is
a
string.
EOS;
[2004-06-17 06:17 UTC] clbustos at entelchile dot net
The code
$str = <<<EOS This
is
a
string.
EOS;
Is incorrect, and produce the following parse error:
Parse error: parse error, unexpected T_SL in J:\sites\PHP_Beautifier\test2.php on line 2
Please, be careful with the construction of your HEREDOCs