ID:               20833
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         Arrays related
 Operating System: windows 2000Pro
 PHP Version:      4.2.3
 New Comment:

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.

I could reproduce this with 4.2.3 (on linux) but not anymore with
4.3.0RC2. The array index of "third" is 1 as expected too. 


Previous Comments:
------------------------------------------------------------------------

[2002-12-05 11:31:42] [EMAIL PROTECTED]

<?php $fruits= array ("first", -1 => "second","third" ); ?>

   <?php echo $fruits[0] ?> // print first
                  </p>
   <?php echo $fruits[-1];?> // print second
                  </p>
   <?php echo $fruits[1];?> // Notice: Undefined offset: 1
                  </p>
   <?php echo count($fruits) ?> // print 2!

What's the key for element "third"?
why array's size is 2?

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=20833&edit=1

Reply via email to