ReflectionMethod::__toString

(PHP 5, PHP 7)

ReflectionMethod::__toString锟斤拷锟截凤拷锟戒方锟斤拷锟斤拷锟斤拷锟斤拷址锟斤拷锟斤拷锟斤拷

说锟斤拷

public ReflectionMethod::__toString ( void ) : string

锟斤拷锟截凤拷锟戒方锟斤拷锟斤拷锟斤拷锟斤拷址锟斤拷锟斤拷锟斤拷

锟斤拷锟斤拷

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

锟斤拷锟斤拷值

ReflectionMethod 实锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷铮诧拷锟斤拷锟斤拷址锟斤拷锟�

锟斤拷锟斤拷

Example #1 ReflectionMethod::__toString() example

<?php
class HelloWorld {

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

}

$reflectionMethod = new ReflectionMethod(new HelloWorld(), 'sayHelloTo');
echo 
$reflectionMethod;
?>

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

Method [ <user> public method sayHelloTo ] {
  @@ /var/www/examples/reflection.php 16 - 18

  - Parameters [1] {
    Parameter #0 [ <required> $name ]
  }
}

锟轿硷拷