3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $certificates = array( $array( 'num' => '111', 'name' => 'cert1' ), $array( 'num' => '222', 'name' => 'cert2' ), ); $field = 'name'; $value = 'cert1'; $out = array_filter( $certificates, function($certificates) use ($field, $value) { return $certificates[$field] == $value; } ); print_r($out);
Output for 5.4.0 - 5.4.19
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in /in/M7ut8 on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_DOUBLE_ARROW in /in/M7ut8 on line 5
Process exited with code 255.