3v4l.org

run code in 300+ PHP versions simultaneously
<?php function atLeastTwoNotNull() { var_dump(count(array_filter(func_get_args(), 'is_null'))); return (count(array_filter(func_get_args(), function($arg){ return !is_null($arg); } )) >= 2); } $a = null; $b = true; $c = false; $d = null; $e = null; var_dump(atLeastTwoNotNull($a, $b, $c, $d, $e));

preferences:
42.85 ms | 402 KiB | 5 Q