3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function getInstance($dbName) { if(empty($dbName)){ return "yes"; } else{ return $dbName; } } echo getInstance(); ?>
Output for 7.1.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function getInstance(), 0 passed in /in/Yik5c on line 13 and exactly 1 expected in /in/Yik5c:2 Stack trace: #0 /in/Yik5c(13): getInstance() #1 {main} thrown in /in/Yik5c on line 2
Process exited with code 255.
Output for 5.1.0 - 7.0.14
Warning: Missing argument 1 for getInstance(), called in /in/Yik5c on line 13 and defined in /in/Yik5c on line 2 yes
Output for 5.0.0 - 5.0.5
Warning: Missing argument 1 for getInstance() in /in/Yik5c on line 2 yes
Output for 4.3.0 - 4.4.9
Warning: Missing argument 1 for getinstance() in /in/Yik5c on line 2 yes