3v4l.org

run code in 300+ PHP versions simultaneously
<?php function optional(?string $optional = null) {} function nullable(?string $nullable) {} optional(); nullable();
Output for 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.14
Fatal error: Uncaught ArgumentCountError: Too few arguments to function nullable(), 0 passed in /in/L9ZAP on line 7 and exactly 1 expected in /in/L9ZAP:4 Stack trace: #0 /in/L9ZAP(7): nullable() #1 {main} thrown in /in/L9ZAP on line 4
Process exited with code 255.

preferences:
57.02 ms | 406 KiB | 5 Q