3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $nums = array(1,2,3,4,5,6); $even = array_reduce( $nums, function($result, $num) { if($num % 2 == 0) { $result[] = $num; } return $result; }, array() ); print_r($even);