3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = array('key' => 'value'); print_r(array_map(function($key,$value){return $value;}, array_filter($test, function($value){ return $value == 'value';})));
based on srlK4
Output for 7.1.0 - 7.3.0rc3
Fatal error: Uncaught ArgumentCountError: Too few arguments to function {closure}(), 1 passed and exactly 2 expected in /in/vCvuu:5 Stack trace: #0 [internal function]: {closure}('value') #1 /in/vCvuu(5): array_map(Object(Closure), Array) #2 {main} thrown in /in/vCvuu on line 5
Process exited with code 255.
Output for 5.6.30, 7.0.30
Warning: Missing argument 2 for {closure}() in /in/vCvuu on line 5 Notice: Undefined variable: value in /in/vCvuu on line 5 Array ( [key] => )
Output for hhvm-3.22.0
Warning: __invoke() expects exactly 2 parameters, 1 given in /in/vCvuu on line -1 Notice: Undefined variable: value in /in/vCvuu on line -1 Array ( [key] => )
Output for hhvm-3.18.5 - 3.21.3
Warning: __invoke() expects exactly 2 parameters, 1 given in /in/vCvuu on line 5 Notice: Undefined variable: value in /in/vCvuu on line 5 Array ( [key] => )