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:
181.77 ms | 1406 KiB | 67 Q