PHP Velho Oeste 2024

ReflectionFunction::__toString

(PHP 5, PHP 7)

ReflectionFunction::__toStringTo string

설명

public string ReflectionFunction::__toString ( void )

To string.

인수

이 함수는 인수가 없습니다.

반환값

Returns ReflectionFunction::export()-like output for the function.

예제

Example #1 ReflectionFunction::__toString() example

<?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 ]
  }
}

참고

add a note add a note

User Contributed Notes

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