3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new SplFixedArray(5); $a[0] = array(1, 2, 3); // get element $element = $a[0]; // modify it $element[0] = 12345; // store the element again $a[0] = $element; var_dump($a);
Output for 5.3.0 - 7.2.0
object(SplFixedArray)#1 (5) { [0]=> array(3) { [0]=> int(12345) [1]=> int(2) [2]=> int(3) } [1]=> NULL [2]=> NULL [3]=> NULL [4]=> NULL }
Output for 5.0.0 - 5.2.17
Fatal error: Class 'SplFixedArray' not found in /in/PM5lp on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: splfixedarray in /in/PM5lp on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: splfixedarray in /in/PM5lp on line 3