3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Foo{ private static $lol; static function bar($v){ self::$lol = $v; echo self::$lol; } } Foo::bar(123); Foo::bar(456);
Output for rfc.property-hooks, git.master, git.master_jit
Deprecated: Calling static trait method Foo::bar is deprecated, it should only be called on a class using the trait in /in/dNWHA on line 11 Deprecated: Accessing static trait property Foo::$lol is deprecated, it should only be accessed on a class using the trait in /in/dNWHA on line 6 Deprecated: Accessing static trait property Foo::$lol is deprecated, it should only be accessed on a class using the trait in /in/dNWHA on line 7 123 Deprecated: Calling static trait method Foo::bar is deprecated, it should only be called on a class using the trait in /in/dNWHA on line 12 Deprecated: Accessing static trait property Foo::$lol is deprecated, it should only be accessed on a class using the trait in /in/dNWHA on line 6 Deprecated: Accessing static trait property Foo::$lol is deprecated, it should only be accessed on a class using the trait in /in/dNWHA on line 7 456

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:
103.01 ms | 2030 KiB | 4 Q