[PLUG] Confusing php warning...

someone plug_0 at robinson-west.com
Thu Dec 21 03:41:54 UTC 2006


"As of PHP 4.3.0, the index generation behaviour described above has
changed. Now, if you append to an array in which the current maximum key
is negative, then the next key created will be zero (0). Before, the new
index would have been set to the largest existing key + 1, the same as
positive indices are."

I don't understand this warning.  How can a key be negative???  Are keys
and indices the same thing?  Aren't you supposed
to specify the key when appending to a php array?  Why this
behavior change?

Michael C. Robinson





More information about the PLUG mailing list