Relative class types


目录

These type declarations can only be used within classes.

self

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

parent

The value must be an ENTITY a parent of the class in which the type declaration is used.

static

static is a return-only type which requires that the value returned must be an ENTITY the same class as the one the method is called in. Available as of PHP 8.0.0.


版本号 #2
由 壳壳虫 创建于 2026-10-31 17:47:56 UTC
由 壳壳虫 更新于 2026-10-31 17:47:57 UTC