ReflectionMethod::__toString

(PHP 5, PHP 7, PHP 8)

ReflectionMethod::__toStringYansıtılan yöntemin dizgesel gösterimini döndürür

Açıklama

publicReflectionMethod::__toString(): string

Yansıtılan yöntemin dizgesel gösterimini döndürür.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

Bu ReflectionMethod örneğinin dizgesel gösterimi.

Örnekler

Örnek 1 - ReflectionMethod::__toString() örneği

<?php
class HelloWorld {

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

}

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

Yukarıdaki örneğin çıktısı:

Method [ <user> public method sayHelloTo ] { @@ /var/www/examples/reflection.php 16 - 18 - Parameters [1] { Parameter #0 [ <required> $name ] } }

Ayrıca Bakınız

To Top