3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum MethodConstraint :string { case A = "a"; case B = "b"; case C = "c"; public getMethod(): string { return $this->value; } }
Output for 8.1.0 - 8.1.29, 8.2.0 - 8.2.20, 8.3.0 - 8.3.8
Parse error: syntax error, unexpected token "(", expecting variable in /in/WtYJ8 on line 9
Process exited with code 255.

preferences:
174.89 ms | 1406 KiB | 67 Q