做自由與創造(zao)的(de)先(xian)行者

相對類類型

PHP中(zhong)文(wén)手冊

這些類型聲明隻能(néng)在(zai)類中(zhong)使用(yong)。

self ¶

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

parent ¶

值必須昰(shi) instanceof 使用(yong)了(le)類型聲明的(de)父級類。

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 起可(kě)用(yong)。

網站建(jian)設(shè)開髮(fa)|APP設(shè)計(ji)開髮(fa)|小(xiǎo)程(cheng)序建(jian)設(shè)開髮(fa)
下一(yi)篇:literal 類型
上一(yi)篇:Never