php8.5
Home/ Manual/ reflection / reflectionparameter/ ReflectionParameter::allowsNull

ReflectionParameter::allowsNull

PHP function Edit on GitHub ✎

(PHP 5, PHP 7, PHP 8)

Checks if null is allowed

Description

ReflectionParameter::allowsNull(): bool

Checks whether the parameter allows null.

Parameters Parameters

Return Values

true if null is allowed, otherwise false

See Also

  • ReflectionParameter::isOptional

Source: reference/reflection/reflectionparameter/allowsnull.xml · from the official PHP manual (php/doc-en)