func_get_args

Returns an array in which each element is a copy of the corresponding member of the current user-defined function’s argument list.

<?php
 function testFunction() {
 echo "Number of arguments : " .func_num_args();
 }
testFunction(1, 2, 3);
?>

It outputs Number of arguments : 3

Share

One thought on “func_get_args”

Leave a Reply

Your email address will not be published. Required fields are marked *