#21680 [Opn->Csd]: heredoc breaks with mac text format

From: Date: Sat, 18 Jan 2003 08:57:33 +0000
Subject: #21680 [Opn->Csd]: heredoc breaks with mac text format
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969350988@lists.php.net to get a copy of this message
ID: 21680 Updated by: philip@php.net Reported By: emil@noget.net -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: FreeBSD 4 PHP Version: 4.3.0 Assigned To: philip New Comment: This is now documented: http://cvs.php.net/cvs.php/phpdoc/en/language/types.xml Thanks for the report :) Previous Comments: ------------------------------------------------------------------------ [2003-01-17 02:37:11] philip@php.net This needs to be documented sometime, assigning to self. ------------------------------------------------------------------------ [2003-01-17 02:05:30] emil@noget.net Cool with me, I was just taken by suprise, by this behavior. ------------------------------------------------------------------------ [2003-01-16 15:02:22] 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-16 02:49:28] emil@noget.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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21680&edit=1

« previous php.doc (#969350988) next »