PHP call_user_func

<?php
function my_call_back_function(){
echo "hello world!";
}
class MyClass{
static function myCallBackMethod(){
echo "Hello World!";
}
}
call_user_func('my_call_back_function');
call_user_func(array("MyClass","myCallBackMethod"));
$obj=new MyClass();
call_user_func(array($obj,"myCallBackMethod"));
call_user_func('MyClass::myCallBackMethod');
class A{
public static function who(){
echo "A\n";
}
}
class B extends A{
public static function who(){
echo "B\n";
}
}
call_user_func(array("B","parent::who"));
上一篇:asp.net 从Excel表导入数据到数据库中


下一篇:《如何让TT T4模板输出多个文件(VS2010中)》-- access911.net 文章