php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4350 here-docs end-marker doesn't work if indentated...
Submitted: 2000-05-08 09:21 UTC Modified: 2000-05-22 06:33 UTC
From: cloaked at hem dot passagen dot se Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Release Candidate 1 OS: WinNT 4.0
Private report: No CVE-ID: None
 [2000-05-08 09:21 UTC] cloaked at hem dot passagen dot se
<?php

	switch (1)
	{
	default:
		print <<< EOH
			I am a here-doc...
		EOH;
		break;
	}
?>

I had a hard time figuring it why this gave a parser error.. It turned out to be the indentation of the end marker.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-08 09:31 UTC] cloaked at hem dot passagen dot se
<?php

	print <<< EOH
		I am a here-doc...
	EOH;

?>

I had a hard time figuring it why this gave a parser error.. It turned out to be the
indentation of the end marker.

 [2000-05-22 06:33 UTC] jah at cvs dot php dot net
Yes, correct, and that's the way it's supposed to behave.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 05:01:29 2024 UTC