3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace NAME_SPACE; trait Bar { public static function qux() { var_dump(self::class, static::class); return new \ReflectionFunction(function () { return __METHOD__; }); } } class Foo { use Bar; } var_dump(Foo::qux()->invoke()); Bar::qux();
Output for git.master, git.master_jit, rfc.property-hooks
string(14) "NAME_SPACE\Foo" string(14) "NAME_SPACE\Foo" string(20) "NAME_SPACE\{closure}" Deprecated: Calling static trait method NAME_SPACE\Bar::qux is deprecated, it should only be called on a class using the trait in /in/R1bKV on line 20 string(14) "NAME_SPACE\Bar" string(14) "NAME_SPACE\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:
37.24 ms | 401 KiB | 8 Q