做(zuò)自(zì)由與創造的先行(xíng)者

相對類類型

PHP中文手冊

這(zhè)些類型聲明(míng)隻能(néng)在類中使用。

self ¶

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

parent ¶

值必須是 instanceof 使用了(le)類型聲明(míng)的父級類。

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. 自(zì) PHP 8.0.0 起可(kě)用。

網站建設開(kāi)發|APP設計開(kāi)發|小程序建設開(kāi)發
下(xià)一(yī)篇:literal 類型
上(shàng)一(yī)篇:Never