PHP 8.1.28 Released!

ReflectionMethod::__toString

(PHP 5, PHP 7, PHP 8)

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

Açıklama

public ReflectionMethod::__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

add a note

User Contributed Notes

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