3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [['Id' => 1], ['As' => 2], ['Id' => 4], 'el']; array_walk($arr, function($v, $k) use ($arr) { if (!is_array($v) || empty($v['Id'])) { unset ($arr[$k]); } // echo $i .' '.$j.PHP_EOL; }); print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [Id] => 1 ) [1] => Array ( [As] => 2 ) [2] => Array ( [Id] => 4 ) [3] => el )

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