update : 2015.11.03
php.shukuma.com

검색:
 
 
Returns the string representation of the Reflection method object.

ReflectionMethod::__toString

(PHP 5)

ReflectionMethod::__toStringReturns the string representation of the Reflection method object.

설명

public string ReflectionMethod::__toString ( void )

Returns the string representation of the Reflection method object.

인수

이 함수는 인수가 없습니다.

반환값

A string representation of this ReflectionMethod instance.

예제

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 ]
  }
}

참고