(PHP 5)
ReflectionMethod::__toString — Returns the string representation of the Reflection method object.
Returns the string representation of the Reflection method object.
У этой функции нет параметров.
A string representation of this ReflectionMethod instance.
Пример #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 ] } }