PHP 8.5.0 Beta 3 available for testing

ReflectionFunction::__toString

(PHP 5, PHP 7, PHP 8)

ReflectionFunction::__toString โ€” ReflectionFunction ใ‚’่กจ็พใ™ใ‚‹ๆ–‡ๅญ—ๅˆ—ใ‚’่ฟ”ใ™

่ชฌๆ˜Ž

public ReflectionFunction::__toString(): string

้–ขๆ•ฐใ‚’่กจ็พใ—ใŸใ€ไบบ้–“ใŒ่ชญใ‚ใ‚‹่ชฌๆ˜Žใ‚’ๅ–ๅพ—ใ—ใพใ™ใ€‚ ใƒ‘ใƒฉใƒกใƒผใ‚ฟใจๆˆปใ‚Šๅ€คใŒๅซใพใ‚Œใพใ™ใ€‚

ใƒ‘ใƒฉใƒกใƒผใ‚ฟ

ใ“ใฎ้–ขๆ•ฐใซใฏใƒ‘ใƒฉใƒกใƒผใ‚ฟใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚

ๆˆปใ‚Šๅ€ค

ๆ–‡ๅญ—ๅˆ—ใ‚’่ฟ”ใ—ใพใ™ใ€‚

ไพ‹

ไพ‹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 ]
  }
}

ๅ‚่€ƒ

๏ผ‹add a note

User Contributed Notes

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