3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyFixedArray extends \SplFixedArray { protected $foo; protected $bar; } $myFixedArr = new MyFixedArray(1); //$myFixedArray[] = 'foo'; var_dump($myFixedArr); var_dump($myFixedArr->toArray()); $myFixedArr2 = new SplFixedArray(1); var_dump($myFixedArr2);
Output for git.master, git.master_jit
object(MyFixedArray)#1 (3) { ["foo":protected]=> NULL ["bar":protected]=> NULL [0]=> NULL } array(1) { [0]=> NULL } object(SplFixedArray)#2 (1) { [0]=> NULL }
Output for rfc.property-hooks
object(MyFixedArray)#1 (3) { [0]=> NULL ["foo":protected]=> NULL ["bar":protected]=> NULL } array(1) { [0]=> NULL } object(SplFixedArray)#2 (1) { [0]=> NULL }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
48.59 ms | 401 KiB | 8 Q