3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ['a' =>1,'b' => 2]; $arr2 = [['a' => 11,'b' => 22],['a' => 111,'b' => 222]]; echo count($arr); if(isset($arr[0]) && is_array($$arr[0])) echo 'arr is 2'; if(isset($arr2[0]) && is_array($$arr2[0])) echo 'arr2 is 2';
Output for git.master, git.master_jit
2 Warning: Array to string conversion in /in/0MmPM on line 8 Warning: Undefined variable $Array in /in/0MmPM on line 8 Warning: Trying to access array offset on value of type null in /in/0MmPM on line 8
Output for rfc.property-hooks
2 Warning: Array to string conversion in /in/0MmPM on line 8 Warning: Undefined variable $Array in /in/0MmPM on line 8 Warning: Trying to access array offset on null in /in/0MmPM on line 8

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:
193.41 ms | 407 KiB | 5 Q