3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { private static int $a = 6; private static function foo(): int { return 5; } public function run(): void { var_dump($this->foo()); var_dump($this::foo()); var_dump(static::foo()); echo "\n-----------\n"; var_dump($this::$a); var_dump(static::$a); echo "\n-----------\n"; $other = new static(); var_dump($other->foo()); var_dump($other::foo()); } } class B extends A { public static string $a = 'b'; public static function foo(): string { return "a"; } } (new B)->run();
Output for rfc.property-hooks, git.master_jit, git.master
int(5) string(1) "a" string(1) "a" ----------- string(1) "b" string(1) "b" ----------- int(5) string(1) "a"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
51.27 ms | 795 KiB | 4 Q