Created
April 24, 2013 23:15
-
-
Save PHLAK/5456380 to your computer and use it in GitHub Desktop.
Testing out PHP's reflection functionality.
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 doSomeShit($foo, $bar, $baz) { | |
// Do some shit... | |
} | |
$function = new ReflectionFunction('doSomeShit'); | |
foreach ($function->getParameters() as $parameter) { | |
$parameters[] = $parameter->name; | |
} | |
print_r($parameters); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment