3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function factorial($n) { if ($n == 1) { return 1; } $n*factorial($n-1); $result[] = $n; return $result; } var_dump(factorial(3));
based on HDHiT
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Unsupported operand types in /in/2Z5p5:9 Stack trace: #0 /in/2Z5p5(16): factorial(3) #1 {main} thrown in /in/2Z5p5 on line 9
Process exited with code 255.
Output for 5.3.20 - 5.6.28
Fatal error: Unsupported operand types in /in/2Z5p5 on line 9
Process exited with code 255.