func_num_args() must be called from a function context¶
Description¶
func_num_arg()
returns the number of arguments used when calling a function or method. As such, it must be inside a function to be useful.
Example¶
<?php
func_num_args();
?>
Solutions¶
Remove func_num_args() calls from the global space (outside any function).
Move the func_num_args() calls inside a function.