3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __invoke() { echo 'self: ' . self::class . PHP_EOL; echo 'static: ' . static::class . PHP_EOL; echo 'get_class(): ' . get_class() . PHP_EOL; echo 'get_class($this): ' . get_class($this) . PHP_EOL; echo 'get_called_class(): ' . get_called_class() . PHP_EOL; } } class Bar extends Foo { } (new Bar())();
Output for git.master_jit, git.master, rfc.property-hooks
self: Foo static: Bar get_class(): Foo get_class($this): Bar get_called_class(): Bar

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