|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-07-23 21:51 UTC] jim at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 16:00:01 2025 UTC |
--- Script 1 --- echo("Start...<br>n"); $x[0][0] = "A"; $x[0][1] = "B"; $x[1][0] = "C"; $x[1][1] = "D"; $size = sizeof($x); echo("X array size = $size<br>n"); for ($i = 0; $i < $size; $i++) { $current_size = sizeof($x[$i]); echo("x[$i] size = $current_size<br>n"); for ($j = 0; $j < $current_size; $j++) { echo("x[$i][$j] = $x[$i][$j]<br>n"); // FAILS } } echo("Done..."); ?> ---- Script 2 ---- <? echo("Start...<br>n"); $x[0][0] = "A"; $x[0][1] = "B"; $x[1][0] = "C"; $x[1][1] = "D"; $size = sizeof($x); echo("X array size = $size<br>n"); for ($i = 0; $i < $size; $i++) { $current_size = sizeof($x[$i]); echo("x[$i] size = $current_size<br>n"); for ($j = 0; $j < $current_size; $j++) { printf("x[$i][$j] = %s<br>n",$x[$i][$j]); // WORKS } } echo("Done..."); ?> --- Peter van Roosmalen has posted examples of this bug on the following systems --- www.peerke.com (Apache 1.2.6 PHP 3.0RC3) www.roosmalen.com (Apache 1.3.4 PHP 3.07) home.cybercomm.nl (Apache 1.3.4 PHP 3.07) URLS: http://www.peerke.com/bug1.php3 http://www.peerke.com/bug2.php3 http://www.peerke.com/php.php3 http://www.roosmalen.com/bug1.php3 http://www.roosmalen.com/bug2.php3 http://www.roosmalen.com/php.php3 http://home.cybercomm.nl/~peerke/bug1.php3 http://home.cybercomm.nl/~peerke/bug2.php3 http://home.cybercomm.nl/~peerke/php.php3