3v4l.org

run code in 300+ PHP versions simultaneously
<?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/aArtB 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/aArtB on line 5
Process exited with code 255.

preferences:
178.86 ms | 1395 KiB | 55 Q