3v4l.org

run code in 500+ PHP versions simultaneously
<?php // PHP 8.0+ OK // PHP 8.0- KO namespace if\then\else {}
Output for 8.1.34, 8.2.0 - 8.2.36, 8.3.0 - 8.3.37, 8.4.1 - 8.4.28, 8.5.0 - 8.5.13, 8.6.0
Output for 7.3.23
Parse error: syntax error, unexpected 'if' (T_IF), expecting '{' in /in/9eHvZ on line 6
Process exited with code 255.

preferences:
13.94 ms | 1166 KiB | 6 Q