PHP Doku:: To string - reflectionfunction.tostring.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-Startseite ≥ PHP-Handbuch ≥ Funktionsreferenz ≥ Variablen- und typbezogene Erweiterungen ≥ Reflection ≥ The ReflectionFunction class ≥ ReflectionFunction::__toString

Ein Service von Reinhard Neidl - Webprogrammierung.

The ReflectionFunction class

<<ReflectionFunction::isDisabled

The ReflectionFunctionAbstract class>>

ReflectionFunction::__toString

(PHP 5)

ReflectionFunction::__toString — To string

Beschreibung

public string ReflectionFunction::__toString ( void )

To string.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

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

Beispiele

Beispiel #1 ReflectionFunction::__toString() example

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

echo new 
ReflectionFunction('title');
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

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

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

Siehe auch


Keine BenutzerBeiträge.
- Beiträge aktualisieren...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)