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 this is not your bug, you can add a comment by following this link.
If this is your bug, but 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

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: Tue Apr 23 21:01:31 2024 UTC