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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jarneodo at francenet dot fr
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sat Dec 21 12:01:31 2024 UTC