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.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1 - 8.4.2
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:
53.61 ms | 406 KiB | 5 Q