3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A extends SplFixedArray { } $a = A::fromArray([1, 2, 3, 4]); var_dump($a);
Output for 5.6.30, 7.0.0 - 7.2.9
object(SplFixedArray)#1 (4) { [0]=> int(1) [1]=> int(2) [2]=> int(3) [3]=> int(4) }
Output for hhvm-3.15.4 - 3.22.0
object(SplFixedArray)#1 (1) { ["data":protected]=> array(4) { [0]=> int(1) [1]=> int(2) [2]=> int(3) [3]=> int(4) } }