3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function chujek(Chujek $wujek = nul) { echo 45; } chujek();
Output for 7.2.0
Warning: Use of undefined constant nul - assumed 'nul' (this will throw an Error in a future version of PHP) in /in/6NMu6 on line 3 Fatal error: Uncaught TypeError: Argument 1 passed to chujek() must be an instance of Chujek, string given, called in /in/6NMu6 on line 7 and defined in /in/6NMu6:3 Stack trace: #0 /in/6NMu6(7): chujek() #1 {main} thrown in /in/6NMu6 on line 3
Process exited with code 255.
Output for 7.0.0 - 7.1.10
Notice: Use of undefined constant nul - assumed 'nul' in /in/6NMu6 on line 3 Fatal error: Uncaught TypeError: Argument 1 passed to chujek() must be an instance of Chujek, string given, called in /in/6NMu6 on line 7 and defined in /in/6NMu6:3 Stack trace: #0 /in/6NMu6(7): chujek() #1 {main} thrown in /in/6NMu6 on line 3
Process exited with code 255.
Output for 5.6.8 - 5.6.28
Notice: Use of undefined constant nul - assumed 'nul' in /in/6NMu6 on line 3 Catchable fatal error: Argument 1 passed to chujek() must be an instance of Chujek, string given, called in /in/6NMu6 on line 7 and defined in /in/6NMu6 on line 3
Process exited with code 255.
Output for 5.3.18 - 5.5.35
Fatal error: Default value for parameters with a class type hint can only be NULL in /in/6NMu6 on line 3
Process exited with code 255.