相对类类型

这些类型声明只能在类中使用。

self

The value must be an instanceof the same class as the one in which the type declaration is used.

parent

值必须是 instanceof 使用了类型声明的父级类。

static

static is a return-only type which requires that the value returned must be an instanceof the same class as the one the method is called in. 自 PHP 8.0.0 起可用。

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top