3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php <?php function coolPluck($array, $allowed) { $output = array(); foreach($array as $k => $v) { if(is_array($v)) { $results = coolPluck($v, $lookup); $output[] = array_intersect_key($results[$k], array_flip($allowed)); } } return $output; } $testArray = array('test' => array('percy' => array('percy' => 'hatcherson'), 'percy' => array('mitchell', 'anderson'))); var_dump(coolPluck($testArray, array('percy')));
Output for 5.3.0 - 5.4.20
Parse error: syntax error, unexpected '<' in /in/od4tu on line 4
Process exited with code 255.