Reflection ReflectionType 클래스
(PHP 7, PHP 8)
소개
ReflectionType 클래스는 함수의 매개변수/반환 유형 또는 클래스의 속성 유형에 대한 정보를 보고합니다. Reflection 확장은 다음 하위 유형을 선언합니다.
- ReflectionNamedType (PHP 7.1.0부터)
- ReflectionUnionType (PHP 8.0.0부터)
- ReflectionIntersectionType (PHP 8.1.0부터)
클래스 개요
abstract class ReflectionType implements Stringable {
/* Methods */
public allowsNull(): bool
public __toString(): string
}
변경 로그
버전 | 설명 |
---|---|
8.0.0 | ReflectionType은 추상화되고 ReflectionType::isBuiltin()은 ReflectionNamedType::isBuiltin()으로 이동되었습니다. |
목차
- ReflectionType::allowsNull — null이 허용되는지 확인
- ReflectionType::__toString — To string