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() { self::test('a'); $this::test('a'); $this->test('a'); Test::test('a'); forward_static_call(array('Test','test'), array('a')); } public function baz() { printf("baz = %d\n", $this->baz); } public function __call($method, $args) { echo "non static "; var_dump($method); } public static function __callStatic($method, $args) { echo " static "; var_dump($method); } } $test = new Test; $test->bar();

preferences:
77.86 ms | 402 KiB | 5 Q