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.

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 bug report at http://bugs.php.net/?id=19180&edit=1
-- 
Try a CVS snapshot:  http://bugs.php.net/fix.php?id=19180&r=trysnapshot
Fixed in CVS:        http://bugs.php.net/fix.php?id=19180&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=19180&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=19180&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=19180&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19180&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=19180&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=19180&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=19180&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=19180&r=globals


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

Reply via email to