3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function v_sum(…$a) { return array_sum($a); } var_dump(v_sum(1, 2, 3, 10));
based on NagtN
Output for 7.3.0alpha1
Fatal error: Uncaught TypeError: Argument 1 passed to v_sum() must be an instance of …, int given, called in /in/UF0it on line 6 and defined in /in/UF0it:2 Stack trace: #0 /in/UF0it(6): v_sum(1, 2, 3, 10) #1 {main} thrown in /in/UF0it on line 2
Process exited with code 255.
Output for 7.0.0 - 7.2.6
Fatal error: Uncaught TypeError: Argument 1 passed to v_sum() must be an instance of …, integer given, called in /in/UF0it on line 6 and defined in /in/UF0it:2 Stack trace: #0 /in/UF0it(6): v_sum(1, 2, 3, 10) #1 {main} thrown in /in/UF0it on line 2
Process exited with code 255.
Output for 5.3.22 - 5.6.28
Catchable fatal error: Argument 1 passed to v_sum() must be an instance of …, integer given, called in /in/UF0it on line 6 and defined in /in/UF0it on line 2
Process exited with code 255.