3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); class Foo { public static function bar($x) {print($x . "\n");} } $foo = new Foo; $foo->bar(print(2));

preferences:
37.53 ms | 402 KiB | 5 Q