3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fixed = SplFixedArray::fromArray(range(1, 3)); $fixed->undefined = 'undefined'; $serialized = serialize($fixed); $unserialized = unserialize($serialized); var_dump($unserialized); var_export($unserialized);
Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.23, 7.4.0 - 7.4.12, 8.0.0
object(SplFixedArray)#2 (4) { [0]=> string(9) "undefined" [1]=> int(1) [2]=> int(2) [3]=> int(3) } SplFixedArray::__set_state(array( 0 => 'undefined', 1 => 1, 2 => 2, 3 => 3, ))