#21680 [WFx]: heredoc breaks with mac text format

From: Date: Fri, 17 Jan 2003 08:05:31 +0000
Subject: #21680 [WFx]: heredoc breaks with mac text format
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-30334@lists.php.net to get a copy of this message
ID: 21680 User updated by: emil@noget.net Reported By: emil@noget.net Status: Wont fix Bug Type: Strings related Operating System: FreeBSD 4 PHP Version: 4.3.0 New Comment: Cool with me, I was just taken by suprise, by this behavior. Previous Comments: ------------------------------------------------------------------------ [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.bugs (#30334) next »