3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum MethodConstraint :string { case A = "a"; case B = "b"; case C = "c"; public function 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 identifier "string", expecting ";" or "{" in /in/qOLCQ on line 9
Process exited with code 255.

preferences:
195.69 ms | 950 KiB | 68 Q