Created
March 27, 2012 15:57
-
-
Save rk/2217439 to your computer and use it in GitHub Desktop.
Tests various methods of "anonymously" calling functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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