3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private static $name = "A"; public static function x() { echo static::$name; } } class B extends A { private static $name = "B"; public static function y() { // I posit these should be _exactly_ the same semantically A::x(); parent::x(); } } B::y();
Output for rfc.property-hooks, git.master, git.master_jit
A Fatal error: Uncaught Error: Cannot access private property B::$name in /in/E98TK:6 Stack trace: #0 /in/E98TK(15): A::x() #1 /in/E98TK(19): B::y() #2 {main} thrown in /in/E98TK on line 6
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:
101.11 ms | 2710 KiB | 4 Q