3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(string $foo = null) {} foo('foo'); foo(null); foo(); foo(1)
Output for 5.6.0 - 5.6.28, 7.0.0 - 7.0.13
Parse error: syntax error, unexpected end of file in /in/NrMZ9 on line 8
Process exited with code 255.

preferences:
167.71 ms | 1395 KiB | 50 Q