|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2020-08-05 18:34 UTC] pevandenham at gmail dot com
[2020-08-06 07:54 UTC] cmb@php.net
-Status: Open
+Status: Verified
[2020-08-06 10:04 UTC] nikic@php.net
[2020-08-06 10:04 UTC] nikic@php.net
-Status: Verified
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Jan 07 05:00:01 2026 UTC |
Description: ------------ A line that only contains CRLF (i.e. a whitespace-only or empty line on Windows) in the middle of a heredoc causes a parse error. This affects any PHP script that has CRLF line endings. To reproduce on e.g. Ubuntu, one can use the unix2dos program to convert the test script below to use CRLF and reproduce the bug: unix2dos bug.php && php bug.php Test script: --------------- <?php $a = <<<HEREDOC a b HEREDOC; var_dump($a); Expected result: ---------------- string(4) "a b" Actual result: -------------- Parse error: Invalid body indentation level (expecting an indentation level of at least 4) in /tmp/test.php on line 5