Skip to content

Instantly share code, notes, and snippets.

@rk
Created March 27, 2012 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rk/2217439 to your computer and use it in GitHub Desktop.
Save rk/2217439 to your computer and use it in GitHub Desktop.
Tests various methods of "anonymously" calling functions
<?php
function print_args() {
foreach(func_get_args() as $value)
echo var_dump($value) . "\n";
}
// This will print "int(2)"
print_args(extract(array('key' => 'value', "bool" => false)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment