3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { public static function status() { self::getStatus(); } protected static function getStatus() { echo "Person is alive"; } } //If we call Person::status() we will see "Person is alive" . Now consider what happens when we make a class that inherits from this: class Deceased extends Person { protected static function getStatus() { echo "Person is deceased"; } } Deceased::status();
Output for git.master, git.master_jit, rfc.property-hooks
Person is alive

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