做自(zì)由與創造的先行者

相對(duì)類類型

PHP中文(wén)手冊

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

self ¶

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

parent ¶

值必須是 instanceof 使用(yòng)了(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 起可用(yòng)。

網站(zhàn)建設開(kāi)發|APP設計(jì)開(kāi)發|小(xiǎo)程序建設開(kāi)發
下(xià)一篇:literal 類型
上(shàng)一篇:Never