ID: 19180 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Documentation problem PHP Version: 4CVS-2002-08-29 New Comment:
This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-08-29 17:36:14] [EMAIL PROTECTED] In http://www.php.net/manual/en/language.types.type-juggling.php there's a sample: $a = 1; // $a is an integer $a[0] = "f"; // $a becomes an array, with $a[0] holding "f" Which will issue an warning: Warning: Cannot use a scalar value as an array in cast.php on line 3 and $a is still a int(1). Tried PHP 4.2.3 under Windows and PHP 4.0.6 under Linux with same result. And in http://www.php.net/manual/en/language.types.string.php inside the Heredoc warning it said: Probably the nastiest gotcha is that there may also not be a carriage return (\r) at the end of the line, only a form feed, AKA newline (\n). Since Microsoft Windows uses the sequence \r\n as a line terminator, your heredoc may not work if you write your script in a Windows editor. However, most programming editors provide a way to save your files with a UNIX line terminator. Which is actually not true. PHP 4 seems working fine with Windows line terminator in Heredoc syntax. Also tried PHP 4.2.3 under Windows and PHP 4.0.6 under Linux, they both work correctly without any problem. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19180&edit=1