PHP Doku:: Checks if null is allowed - reflectionparameter.allowsnull.html

Verlauf / Chronik / History: (8) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzVariablen- und typbezogene ErweiterungenReflectionThe ReflectionParameter classReflectionParameter::allowsNull

Ein Service von Reinhard Neidl - Webprogrammierung.

The ReflectionParameter class

<<The ReflectionParameter class

ReflectionParameter::__clone>>

ReflectionParameter::allowsNull

(PHP 5)

ReflectionParameter::allowsNullChecks if null is allowed

Beschreibung

public bool ReflectionParameter::allowsNull ( void )

Checks whether the parameter allows NULL.

Warnung

Diese Funktion ist bis jetzt nicht dokumentiert. Es steht nur die Liste der Argumente zur Verfügung.

Parameter-Liste

Diese Funktion hat keine Parameter.

Rückgabewerte

TRUE if NULL is allowed, otherwise FALSE

Siehe auch


Ein BenutzerBeitrag:
- Beiträge aktualisieren...
jeroen at asystance dot nl
10.08.2010 11:56
It seems this always returns true for user-defined functions. Consider
function f1 ( $var1 = null, $var2, $var3 = false ) {}
ReflectionMethod reports these all as nullable (and only the 3rd as optional - weird)



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",...)