3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function itemsasd(){ $args = array(); echo "Number of arguments: " . func_num_args() . "<br />"; for($i = 0 ; $i < func_num_args(); $i++) { echo "Argument $i = " . func_get_arg($i) . "<br />"; $args[i] = func_get_arg($i); } foreach($args as $arg){ echo $arg; } } itemsasd(1,2,3); ?>
Output for 4.3.0 - 7.1.0
Number of arguments: 3<br />Argument 0 = 1<br /> Notice: Use of undefined constant i - assumed 'i' in /in/iasnq on line 9 Argument 1 = 2<br /> Notice: Use of undefined constant i - assumed 'i' in /in/iasnq on line 9 Argument 2 = 3<br /> Notice: Use of undefined constant i - assumed 'i' in /in/iasnq on line 9 3