> From:             [EMAIL PROTECTED]
> Operating system: 
> PHP version:      4CVS-2002-08-29
> PHP Bug Type:     Documentation problem
> Bug description:  Wrong descriptions in language/types.xml
> 
> 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.

Tried this under PHP 4.2.3 (Linux) and can confirm it.
 
> 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.

Can confirm this two.

What should be done about this bug? Should the example, and the last note be removed 
from the manual?

Best regards,

Jome



--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to