0%
弱国无外交,人弱亦如此
### call_user_func_array
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| <?php function foobar($arg, $arg2) { echo __FUNCTION__, " got $arg and $arg2\n"; } class foo { function bar($arg, $arg2) { echo __METHOD__, " got $arg and $arg2\n"; } }
call_user_func_array("foobar", array("one", "two"));
$foo = new foo; call_user_func_array(array($foo, "bar"), array("three", "four")); ?>
|
call_user_func
1 2 3 4 5 6 7 8
| function increment($var) { $var++; }
$a = 0; call_user_func('increment', $a); echo $a."\n";
|
其他
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| $class= new \Jason\Ccshop\Models\Product();
dump(get_class($class));
dump(get_class_methods($class));
dump(get_object_vars($class)); dump(get_class_vars($class));
dump(get_parent_class($class));
dump(method_exists($class, 'getMainThumb'));
call_user_method_array
|