3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* $belongGroup = [ 2, 1 ]; $groups = [ 1 => ['parent_group_id' => 0, 'group_id' => 1], 2 => ['parent_group_id' => 1, 'group_id' => 2], 3 => ['parent_group_id' => 0, 'group_id' => 3], 4 => ['parent_group_id' => 0, 'group_id' => 4], ]; $result = []; foreach($belongGroup as $g) { $l = $groups[$g]; while(true) { if ($l['parent_group_id'] == 0) { break; } $parentId = $l['parent_group_id']; $l = $groups[$parentId]; unset($groups[$parentId]); } $result[] = intval($l['group_id']); } echo implode(", ", $result);*/ $g = []; $l = $g[5]; echo $l['yolo'] == 0;
Output for git.master, git.master_jit
Warning: Undefined array key 5 in /in/upegc on line 31 Warning: Trying to access array offset on value of type null in /in/upegc on line 32 1
Output for rfc.property-hooks
Warning: Undefined array key 5 in /in/upegc on line 31 Warning: Trying to access array offset on null in /in/upegc on line 32 1

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:
64.79 ms | 401 KiB | 8 Q