GoLang ReflectionMethod::__toString

request it (390)
GoLang replacement for PHP's ReflectionMethod::__toString [edit | history]



Do you know a GoLang replacement for PHP's ReflectionMethod::__toString? Write it!

PHP ReflectionMethod::__toString

PHP original manual for ReflectionMethod::__toString [ show | php.net ]

ReflectionMethod::__toString

(PHP 5, PHP 7)

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

Description

public string ReflectionMethod::__toString ( void )

Returns the string representation of the Reflection method object.

Parameters

This function has no parameters.

Return Values

A string representation of this ReflectionMethod instance.

Examples

Example #1 ReflectionMethod::__toString() example

<?php
class HelloWorld {

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

}

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

The above example will output:

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

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

See Also