3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar($param = NULL) { if (func_num_args() == 0) throw new Exception("Missing parameter"); var_dump($param); } } $foo = new Foo(); $foo->bar("hello"); $foo->bar();

preferences:
40.17 ms | 402 KiB | 5 Q