3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T { public static int $sp = 1; public static function sm(): int { return 2; } // public const C = 3; } var_dump(T::$sp); var_dump(T::sm()); // var_dump(T::C);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Accessing static trait property T::$sp is deprecated, it should only be accessed on a class using the trait in /in/eGlYm on line 9 int(1) Deprecated: Calling static trait method T::sm is deprecated, it should only be called on a class using the trait in /in/eGlYm on line 10 int(2)

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:
121.9 ms | 402 KiB | 8 Q