Skip to content

Instantly share code, notes, and snippets.

@akanehara
Created April 4, 2014 11:49
Show Gist options
  • Save akanehara/9972929 to your computer and use it in GitHub Desktop.
Save akanehara/9972929 to your computer and use it in GitHub Desktop.
<?php
paramsFromArgs($class, $method, $args) {
...
}
class Foo {
public function method($a, $b, $c) {
$params = static::paramsFromArgs(__CLASS__, __METHOD__, func_get_args());
var_dump($params);
}
}
$foo = new Foo();
$foo->method(1, null, 3);
>>> ['a'=>1, 'c'=>3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment