3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = ['first', 'luke', 'last', 'lancaster']; $odd = array_filter($array, function ($input) {return $input & 1;}); $even = array_filter($array, function ($input) {return !($input & 1);}); var_dump($odd);
based on 7kG4D
Output for 7.1.0 - 7.3.0beta1
Warning: A non-numeric value encountered in /in/BrqAg on line 5 Warning: A non-numeric value encountered in /in/BrqAg on line 5 Warning: A non-numeric value encountered in /in/BrqAg on line 5 Warning: A non-numeric value encountered in /in/BrqAg on line 5 Warning: A non-numeric value encountered in /in/BrqAg on line 6 Warning: A non-numeric value encountered in /in/BrqAg on line 6 Warning: A non-numeric value encountered in /in/BrqAg on line 6 Warning: A non-numeric value encountered in /in/BrqAg on line 6 array(0) { }
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.0.24
array(0) { }