php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #19180 Wrong descriptions in language/types.xml
Submitted: 2002-08-29 17:36 UTC Modified: 2002-09-18 08:43 UTC
From: dallas@php.net Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4CVS-2002-08-29 OS:
Private report: No CVE-ID: None
 [2002-08-29 17:36 UTC] dallas@php.net
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.

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-18 08:43 UTC] jome@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Aug 15 19:01:28 2024 UTC