3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ static $default="A::default "; public static $public="A::public "; protected static $protected="A::protected "; private static $private="A::private "; function test(){ echo $this::$default; echo $this::$public; echo static::$protected; echo static::$private;//error } } class B extends A{ static $default="B::default "; public static $public="B::public "; protected static $protected="B::protected "; private static $private="B::private "; } $obj = new B; $obj->test();
Output for git.master, git.master_jit, rfc.property-hooks
B::default B::public B::protected Fatal error: Uncaught Error: Cannot access private property B::$private in /in/KXeNn:12 Stack trace: #0 /in/KXeNn(23): A->test() #1 {main} thrown in /in/KXeNn on line 12
Process exited with code 255.

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:
40.22 ms | 401 KiB | 8 Q