Skip to content

Instantly share code, notes, and snippets.

@PHLAK
Created April 24, 2013 23:15
Show Gist options
  • Save PHLAK/5456380 to your computer and use it in GitHub Desktop.
Save PHLAK/5456380 to your computer and use it in GitHub Desktop.
Testing out PHP's reflection functionality.
<?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