Reflection ReflectionFunction::__toString

(PHP 5, PHP 7, PHP 8)

ReflectionFunction::__toString — To string


설명

public ReflectionFunction::__toString(): string

To string.


매개변수

이 함수에는 매개변수가 없습니다.


반환 값

함수에 대한 ReflectionFunction::export()와 유사한 출력을 반환합니다.


Examples

예제 #1 ReflectionFunction::__toString() 예제

                  
<?php
function title($title, $name)
{
    return sprintf("%s. %s\r\n", $title, $name);
}

echo new ReflectionFunction('title');
?>
                  
                

위의 예는 다음과 유사한 결과를 출력합니다.

Function [ <user> function title ] {
  @@ Command line code 1 - 1

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

기타