3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $baz = 1; public static function foo() { echo "foo\n"; } public function bar() { echo "bar\n"; $this->foo(); $this::foo(); self::foo(); self::baz(); } public function baz() { printf("baz = %d\n", $this->baz); } } $test = new Test; $test->bar();

preferences:
36.36 ms | 402 KiB | 5 Q