The ReflectionType class
From Get docs
Php/docs/latest/class.reflectiontype
The ReflectionType class
Introduction
(PHP 7, PHP 8)
The ReflectionType class reports information about a function's parameter/return type or a class's property type. The Reflection extension declares the following subtypes:
- ReflectionNamedType (as of PHP 7.1.0)
- ReflectionUnionType (as of PHP 8.0.0)
Class synopsis
abstract class ReflectionType implements Stringable {
public allowsNull(): bool
public __toString(): string
}
Changelog
Version | Description |
---|---|
8.0.0 | ReflectionType has become abstract and ReflectionType::isBuiltin() has been moved to ReflectionNamedType::isBuiltin(). |
Table of Contents
- ReflectionType::allowsNull — Checks if null is allowed
- ReflectionType::__toString — To string
© 1997–2020 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.reflectiontype.php
/* Methods */