3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { public function callMe() { return static::class . '::hi'; } public static function hi() { print "Hi from " . static::class . "\n"; } } class B extends A { } $a = new A(); $callback = $a->callMe(); $callback(); $b = new B(); $callback = $b->callMe(); $callback();
Output for git.master, git.master_jit, rfc.property-hooks
Hi from A Hi from B

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.93 ms | 1743 KiB | 4 Q