3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 4; function myFunction () { if (!func_num_args()) { $input = $GLOBALS['foo']; } else { $input = func_get_arg(0); } echo "$input\n"; } myFunction('hello'); myFunction();

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
155.78 ms | 2021 KiB | 11 Q