3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function t($x) {return true;} var_dump(array_filter(array(1,2,3), "t", 5));
based on VL2D3
Output for 5.6.0 - 7.2.0
array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }
Output for 5.3.0 - 5.5.38
Warning: array_filter() expects at most 2 parameters, 3 given in /in/ocGUr on line 3 NULL
Output for 4.3.0 - 5.2.17
Warning: Wrong parameter count for array_filter() in /in/ocGUr on line 3 NULL