3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = [['Id' => 1], ['As' => 2], ['Id' => 4], 'el']; array_walk($arr, function($v, $k) { if (!is_array($v) || empty($v['Id'])) { unset ($arr[$k]); } // echo $i .' '.$j.PHP_EOL; });
based on hrtoG
Output for 5.4.2 - 7.2.0
Notice: Undefined variable: arr in /in/cHYUM on line 7 Notice: Undefined variable: arr in /in/cHYUM on line 7
Output for 5.3.17 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/cHYUM on line 3
Process exited with code 255.