downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

ReflectionObject> <ReflectionMethod::setAccessible
[edit] Last updated: Fri, 17 May 2013

view this page in

ReflectionMethod::__toString

(PHP 5)

ReflectionMethod::__toStringRetourne une représentation textuelle de la méthode

Description

public string ReflectionMethod::__toString ( void )

Récupère une représentation textuelle de la méthode.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Une représentation textuelle de cet objet ReflectionMethod.

Exemples

Exemple #1 ReflectionMethod::__toString() example

<?php
class HelloWorld {

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

}

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

L'exemple ci-dessus va afficher :

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

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

Voir aussi



add a note add a note User Contributed Notes ReflectionMethod::__toString - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites