3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected static $a = 'Z'; public static function test() { echo self::$a.PHP_EOL; } public static function test2() { echo static::$a.PHP_EOL; } } class B extends A { protected static $a = 'Y'; public static function test3() { echo self::$a.PHP_EOL; } public static function test4() { echo static::$a.PHP_EOL; } } B::test(); B::test2(); B::test3(); B::test4();
Output for git.master, git.master_jit, rfc.property-hooks
Z Y Y Y

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.19 ms | 401 KiB | 8 Q