PHP: func_num_args - Manual,PHP: Function arguments - Manual,PHP: func_get_args - Manual,PHP,Quesion
How do I find out the number of parameters passed into function?


func_num_args — Returns the number of arguments passed to the function.


Example:

<?php
function test()
{
    $number_of_args = func_num_args();
    echo "Number of arguments: $number_of_args";
}


test ("a","b");
?>