3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function lorem($d) { $i = 2; if($d == true) { $i = $i + 10; } else { $i = $i * 10; } } echo lorem();
Output for 7.1.0
Fatal error: Uncaught ArgumentCountError: Too few arguments to function lorem(), 0 passed in /in/uf96L on line 11 and exactly 1 expected in /in/uf96L:2 Stack trace: #0 /in/uf96L(11): lorem() #1 {main} thrown in /in/uf96L on line 2
Process exited with code 255.
Output for 5.1.0 - 7.0.14
Warning: Missing argument 1 for lorem(), called in /in/uf96L on line 11 and defined in /in/uf96L on line 2 Notice: Undefined variable: d in /in/uf96L on line 4
Output for 4.3.0 - 5.0.5
Warning: Missing argument 1 for lorem() in /in/uf96L on line 2