3v4l.org

run code in 500+ PHP versions simultaneously
<?php enum E: string { case A = 'a'; case B = 'b'; case C = 'c'; case D = 'd'; } var_dump(in_array(E::B, E::cases())); var_dump(array_unique(E::cases())); var_dump(array_unique(E::cases(), SORT_REGULAR)); ?>
Output for git.master, git.master_jit
bool(true) Fatal error: Uncaught Error: Object of class E could not be converted to string in /in/q9iGl:12 Stack trace: #0 /in/q9iGl(12): array_unique(Array) #1 {main} thrown in /in/q9iGl on line 12
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:
59.44 ms | 532 KiB | 4 Q