php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #141 $z[] = $x // non-indexed arrays doesn't work
Submitted: 1998-03-03 17:02 UTC Modified: 1998-03-03 17:51 UTC
From: jarneodo at francenet dot fr Assigned:
Status: Closed Package: Other
PHP Version: 3.0b5 OS: Windows NT4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
22 - 11 = ?
Subscribe to this entry?

 
 [1998-03-03 17:02 UTC] jarneodo at francenet dot fr
$z[] = "z";
$z[] = "zz";
echo "z[0] = " . $z[0] . "\n";
echo "z[1] = " . $z[1] . "\n";
echo "count(z) = " . count($z) . "\n\n";

$x[] = "x";
$x[] = "xx";
echo "x[0] = " . $x[0] . "\n";
echo "x[1] = " . $x[1] . "\n";
echo "count(x) = " . count($x) . "\n\n";

$z[] = $x;
echo "x[0] = " . $x[0] . "\n";
echo "x[1] = " . $x[1] . "\n";
echo "z[0] = " . $z[0] . "\n";
echo "z[1] = " . $z[1] . "\n";
echo "z[2] = " . $z[2] . "\n";
echo "z[3] = " . $z[3] . "\n";
echo "count(z) = " . count($z) . "\n\n";

/* result: non-indexed arrays with PHP Version 3.0b5 on Windows95/NT Version (binaries)
z[0] = z
z[1] = zz
count(z) = 2

x[0] = x
x[1] = xx
count(x) = 2

x[0] = x
x[1] = xx
z[0] = z
z[1] = zz
z[2] = 
z[3] = 
count(z) = 3
*/

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-03-03 17:51 UTC] zeev
that's the correct behavior...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 18:01:28 2024 UTC