3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f = new class { public function bar(int $a) { print $a . PHP_EOL; } }; $res = $f?->bar(5); $c = $f?->bar(?); $c(4); $g = null; $d = $g?->bar(?); $d(3);
No results found

preferences:
139.25 ms | 1393 KiB | 7 Q