$class_methods = get_class_methods(new myclass());foreach ($class_methods as $method_name) { echo "$method_name\n";}
// create an object$bar = new foo();// external callecho "Its name is " , get_class($bar) , "\n";// internal call$bar->name();?>
Its name is foo
posted on 2018-01-19 12:57 阅读( ...) 评论( ...)