Over a million developers have joined DZone.

Variable-length Argument List In PHP

DZone's Guide to

Variable-length Argument List In PHP

Free Resource
See the document for
func_num_args(), func_get_arg(), and func_get_args(). Auto Insurance | Auto insurance agencies closng in atlanta | nova scotia auto insurance quote | autoinsurance.apparels24.com 

function foo()
   $numargs = func_num_args();
   echo "Number of arguments: $numargs
\n"; if ($numargs >= 2) { echo "Second argument is: " . func_get_arg(1) . "
\n"; } $arg_list = func_get_args(); for ($i = 0; $i < $numargs; $i++) { echo "Argument $i is: " . $arg_list[$i] . "
\n"; } } foo(1, 2, 3);
Car Insurance Rates - Get Free Auto Insurance Quotes Online | Auto insurance in sioux falls

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}