PHP 5.4.36 Released

ReflectionMethod::__toString

(PHP 5)

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

Descrição

public string ReflectionMethod::__toString ( void )

Returns the string representation of the Reflection method object.

Parâmetros

Esta função não possui parâmetros.

Valor Retornado

A string representation of this ReflectionMethod instance.

Exemplos

Exemplo #1 ReflectionMethod::__toString() example

<?php
class HelloWorld {

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

}

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

O exemplo acima irá imprimir:

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

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

Veja Também

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top