3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Accessor { public static function int():int { var_dump(new ReflectionEnum(self::class)); } } enum Titular: int { use Accessor; case minimus=1; case maximus=2; } echo Titular::minimus::int();
Output for git.master_jit, git.master
object(ReflectionEnum)#3 (1) { ["name"]=> string(7) "Titular" } Fatal error: Uncaught TypeError: Titular::int(): Return value must be of type int, none returned in /in/S09UY:8 Stack trace: #0 /in/S09UY(18): Titular::int() #1 {main} thrown in /in/S09UY on line 8
Process exited with code 255.

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:
33.61 ms | 405 KiB | 5 Q