|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #77539 Changes to heredoc/nowdoc syntax in 7.3 not documented
Submitted: 2019-01-29 10:20 UTC Modified: 2021-08-23 16:08 UTC
Avg. Score:2.8 ± 0.4
Reproduced:2 of 3 (66.7%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: rasc at jfmedier dot dk Assigned: cmb (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 7.3.1 OS: Windows 10 / WSL
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: rasc at jfmedier dot dk
New email:
PHP Version: OS:


 [2019-01-29 10:20 UTC] rasc at jfmedier dot dk
PHP 7.3 introduced a minor BC syntax break against 7.2.

Likely this regression was introduced while refactoring to introduce support for flexible heredoc/nowdoc syntax in 7.3.

You can see a failing build here:

This build succeeds under 7.1 and 7.2, but fails under 7.3.

You can see the parse error affecting 7.3.0 and 7.3.1 here:

(by the way: looks like the documentation page was never updated to reflect changed from the flexible heredoc/nowdoc syntax RFC.)

Test script:

$mime_header = <<<MIME
Date: Thu, 15 Sep 2016 17:20:54 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8

Expected result:
Should compile.

Actual result:
Exits with the following error:

> Parse error: syntax error, unexpected ':' in /in/1H0l7 on line 5


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-29 12:28 UTC]
Isn't this the part mentioned at ???? ?

> Due to the introduction of flexible heredoc/nowdoc syntax, doc strings that contain the ending label inside their body may cause syntax errors or change in interpretation
 [2019-01-29 13:55 UTC]
-Summary: BC break in heredoc syntax in 7.3 +Summary: Changes to heredoc/nowdoc syntax in 7.3 not documented -Status: Open +Status: Verified -Package: PHP Language Specification +Package: Scripting Engine problem
 [2019-01-29 13:55 UTC]
This has been changed deliberately, and is alread documented in
the migration guide[1].  The heredoc/nowdoc docs[2] are not yet
up-to-date, so I'm changing to doc problem.

[1] <>
[2] <>
 [2021-08-23 16:08 UTC]
-Status: Verified +Status: Closed -Type: Bug +Type: Documentation Problem -Assigned To: +Assigned To: cmb
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Sep 25 14:03:37 2021 UTC