3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_even(int $n): bool { $fn = null; $fn = fn(int $nr, bool $not): bool => $nr === 0 ? !$not : $fn(($nr < 0 ? abs($nr) : $nr) - 1, !$not); return $fn($n, false); } for($i = -5; $i <= 12; $i++) { printf('is %d even? %s.%s', $i, is_even($i) ? 'yes': 'no', "\n"); }

preferences:
37.99 ms | 402 KiB | 5 Q