3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum Foo: int { const BAR = "F"; case F = Foo::BAR; private function foo() {} } var_dump(Foo::F);
Output for git.master, git.master_jit
Fatal error: Uncaught TypeError: Enum case type string does not match enum backing type int in /in/bgraf:11 Stack trace: #0 {main} thrown in /in/bgraf on line 11
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:
127.27 ms | 1399 KiB | 9 Q