3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array(null,18,19); function is_not_null ($var) { return !is_null($var); } $filtered = array_filter($arr, 'is_not_null'); print_r($filtered);
Output for 5.6.30, hhvm-3.15.4 - 3.22.0, 7.0.0 - 7.3.0rc3
Array ( [1] => 18 [2] => 19 )