php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #21680 heredoc breaks with mac text format
Submitted: 2003-01-16 02:49 UTC Modified: 2003-01-18 02:57 UTC
From: emil at noget dot net Assigned: philip (profile)
Status: Closed Package: Documentation problem
PHP Version: 4.3.0 OS: FreeBSD 4
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: emil at noget dot net
New email:
PHP Version: OS:

 

 [2003-01-16 02:49 UTC] emil at noget dot net
It appears that the heredoc string type breaks if the script is in mac text format.

This has been noticed before http://www.zend.com/lists/php-dev/200110/msg00815.html, but i havn't been able to find a bugreport?

Im working in Windows with UltraEdit, and the following code breaks, when I use UltrEdit to convert from dos format to mac format:

<?php
	
	echo <<<EOD
		foo
EOD;
?>

This error is produced:

Parse error: parse error, unexpected $ in /usr/home/nej/public_html/heredoc.php on line 5

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-16 15:02 UTC] iliaa@php.net
The 1st character before 'EOD;' must be a newline as defined by your operating system. Meaning that it can only be \r if you are using a MAC or an OS where \r is EOL.
 [2003-01-17 02:05 UTC] emil at noget dot net
Cool with me, I was just taken by suprise, by this behavior.
 [2003-01-17 02:37 UTC] philip@php.net
This needs to be documented sometime, assigning to self.
 [2003-01-18 02:57 UTC] philip@php.net
This is now documented:
http://cvs.php.net/cvs.php/phpdoc/en/language/types.xml

Thanks for the report :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Sep 11 07:01:28 2024 UTC