php 5.3 Array Compatibility

In php 5.3 the way arrays are handled have changed.

Example array:

 1, 'bar' => 2, 'foo' => 3); ?>

use to over write 'foo' with the last one in the array to give:

array(
    'foo' => 3,
    'bar' => 2
)

now in 5.3 it returns

array(
    'foo' => 1,
    'bar' => 2
)

I am testing on a php v5.2.11 so i can not test this my self this example is from the php.net website: http://php.net/manual/en/language.types.array.php and search the page for 5.3

would the method of setting values via


provide a backward compatible patch for this issue? есть ли другие вещи, на которые следует обращать внимание при работе с массивами в новой версии php?

5
задан Ruttyj 7 December 2010 в 15:54
поделиться