相对类类型

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

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 起可用。

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。
To Top