3v4l.org

run code in 300+ PHP versions simultaneously
<?php const A = 'foo'; enum Suit: string { case Heart = A; }
Output for 8.0.0 - 8.0.10
Parse error: syntax error, unexpected identifier "Suit" in /in/uibJ7 on line 5
Process exited with code 255.
Output for 7.3.0 - 7.3.30, 7.4.0 - 7.4.23
Parse error: syntax error, unexpected 'Suit' (T_STRING) in /in/uibJ7 on line 5
Process exited with code 255.

preferences:
184.72 ms | 1395 KiB | 71 Q