php8.5
Home/ Manual/ reference / reflection/ The ReflectionType class

The ReflectionType class

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)ReflectionIntersectionType (as of PHP 8.1.0)

Intro

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)
  • ReflectionIntersectionType (as of PHP 8.1.0)

Class synopsis

abstract ReflectionType implements Stringable { }

Changelog

VersionDescription
8.0.0ReflectionType has become abstract and ReflectionType::isBuiltin() has been moved to ReflectionNamedType::isBuiltin().

Reflectiontype

In this section

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