3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a=array("Horse","Dog","Cat"); $b=array("Horse", "Cat"); print_r(array_filter(function($v) use ($b) { return (in_array($v, $b));}, $a)); ?>
based on sSus4
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0rc3
Warning: array_filter() expects parameter 1 to be array, object given in /in/5L1mu on line 4
Output for hhvm-3.18.4 - 3.21.0
Warning: array_filter() expects parameter 1 to be an array or collection in /in/5L1mu on line 4