Since: 7.1

class ReflectionNamedType extends ReflectionType (View source)

Methods

bool
allowsNull()

Checks if null is allowed

bool
isBuiltin()

Checks if it is a built-in type

string
__toString()

To string

string
getName()

Get the text of the type hint.

Details

bool allowsNull()

Since: 7.0

Checks if null is allowed

Return Value

bool

Returns {\true} if {\null} is allowed, otherwise {\false}

bool isBuiltin()

Since: 7.1 overrides the parent {@see \ReflectionType::isBuiltin()} method.

Checks if it is a built-in type

Return Value

bool

Returns {\true} if it's a built-in type, otherwise {\false}

string __toString()

Since: 7.0

To string

Return Value

string

Returns string representation of the object that implements this interface (and/or "__toString" magic method).

See also

ReflectionNamedType::getName

string getName()

Since: 7.1

Get the text of the type hint.

Return Value

string

Returns the text of the type hint.