3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array('test' => array('percy' => array('hello' => 'hatcherson'), 'percy' => array('mitchell', 'anderson'))); $allowed = array('percy'); $combined = array(); foreach ($arr as $k => $v) { if (is_array($v) { $combined[] = array_intersect_key($arr[$k], array_flip($allowed)); } } var_dump($combined);
Output for 5.3.0 - 5.5.4
Parse error: syntax error, unexpected '{' in /in/eT9KM on line 10
Process exited with code 255.