3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //factorial.php $n = $argv[1]; $factorial = array_product(range(1, $n)); echo $factorial . "\n"; //direct output printf("%g\n", $factorial); //force scientific notation
Output for 5.3.0 - 7.1.10
Notice: Undefined offset: 1 in /in/UsE0h on line 2 0 0
Output for 5.2.1 - 5.2.17
Notice: Undefined offset: 1 in /in/UsE0h on line 2 0 0
Output for 5.1.1 - 5.2.0
Notice: Undefined offset: 1 in /in/UsE0h on line 2 0
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/UsE0h on line 5
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Notice: Undefined offset: 1 in /in/UsE0h on line 2 Fatal error: Call to undefined function array_product() in /in/UsE0h on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Notice: Undefined offset: 1 in /in/UsE0h on line 2 Fatal error: Call to undefined function: array_product() in /in/UsE0h on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Notice: Undefined offset: 1 in /in/UsE0h on line 2 Fatal error: Call to undefined function: array_product() in /in/UsE0h on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: argv in /in/UsE0h on line 2 Fatal error: Call to undefined function: array_product() in /in/UsE0h on line 3