ReflectionMethod::getPrototype

(PHP 5 >= 5.1.2, PHP 7)

ReflectionMethod::getPrototype锟斤拷锟截凤拷锟斤拷原锟斤拷 (锟斤拷锟斤拷锟斤拷锟�)

说锟斤拷

public ReflectionMethod::getPrototype ( void ) : ReflectionMethod

锟斤拷锟截凤拷锟斤拷原锟斤拷

锟斤拷锟斤拷

锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷

锟斤拷锟斤拷值

锟斤拷锟斤拷原锟酵碉拷一锟斤拷 ReflectionMethod 实锟斤拷

锟斤拷锟斤拷锟届常

锟斤拷锟斤拷锟斤拷锟矫伙拷锟皆拷停锟斤拷锟斤拷锟揭伙拷锟� ReflectionException

锟斤拷锟斤拷

Example #1 ReflectionMethod::getPrototype() example

<?php
class Hello {

    public function 
sayHelloTo($name) {
        return 
'Hello ' $name;
    }

}
class 
HelloWorld extends Hello {

    public function 
sayHelloTo($name) {
        return 
'Hello world: ' $name;
    }

}

$reflectionMethod = new ReflectionMethod('HelloWorld''sayHelloTo');
var_dump($reflectionMethod->getPrototype());
?>

锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�

object(ReflectionMethod)#2 (2) {
  ["name"]=>
  string(10) "sayHelloTo"
  ["class"]=>
  string(5) "Hello"
}

锟轿硷拷