3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php some_function(); function some_function(){ $nr = 2; $a = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); $a = array_filter($a, create_function('$e', ' return $e % '.$nr.' == 0; ')); var_dump($a); }
based on 8Rpdg
Output for 7.2.0 - 7.2.6
Deprecated: Function create_function() is deprecated in /in/8binh on line 7 array(5) { [1]=> int(2) [3]=> int(4) [5]=> int(6) [7]=> int(8) [9]=> int(10) }
Output for 4.3.0 - 7.1.20
array(5) { [1]=> int(2) [3]=> int(4) [5]=> int(6) [7]=> int(8) [9]=> int(10) }