Skip to content

Instantly share code, notes, and snippets.

@joseporiol
Created February 25, 2014 13:41
Show Gist options
  • Save joseporiol/9208922 to your computer and use it in GitHub Desktop.
Save joseporiol/9208922 to your computer and use it in GitHub Desktop.
Function overloading
function Test(){
$NumberOfArguments = func_num_args();
for ($x=0; $x < $NumberOfArguments; $x++){
$Argument = func_get_arg($x);
print $Argument . "\n";
}
// Another way:
print_r(func_get_args());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment