|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-11-27 01:01 UTC] sniper@php.net
[2003-11-27 07:41 UTC] wez@php.net
[2003-11-27 08:36 UTC] phpbug at lapage dot com
[2013-05-07 07:14 UTC] salathe@php.net
[2013-05-07 07:17 UTC] salathe@php.net
[2013-08-20 15:41 UTC] daverandom@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 14:00:01 2025 UTC |
Description: ------------ Writing in text-mode does not play nicely with heredoc, in Win32. Line endings become \r\r\n in the typical situation: php source code with \r\n endings. This will break, for example, batch files written for Win98. Reproduce code: --------------- $fp= fopen('file.txt', 'wt'); fwrite($fp, <<<ENDTEXT One line of text Another line of text Last line of text\n ENDTEXT ); fclose($fp); Expected result: ---------------- One line of text\r\n Another line of text\r\n Last line of text\r\n Actual result: -------------- One line of text\r\r\n Another line of text\r\r\n Last line of text\r\n