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.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
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:
82.69 ms | 1003 KiB | 4 Q