Results of 1 - 1 of about 1 for doubleColon (0.000 sec.)
- スコープ定義演算子 (::) | PHP 8.3 9414
- スコープ定義演算子 (::) スコープ定義演算子 (またの名を Paamayim Nekudotayim)、 平たく言うと「ダブルコロン」は、トークンのひとつです。 クラスまたはその親クラスの 定数 、 static プロパティ、 static メソッドにアクセスできます。 さらに、static
... 'A constant value' ; } class OtherClass extends MyClass { public static $my_static = 'static var' ; public static function doubleColon () { echo parent :: CONST_VALUE . "\n" ; echo self :: $my_static . "\n" ; } } $classname = 'OtherClass' ; $classname :: do ... ubleColon (); OtherClass :: doubleColon (); ?> 拡張されたクラスが親クラスのメソッドの定義をオーバーライドする際、 PHPは親クラスのメソッドをコールしません。 親クラ ...
-
https://man.mtool.work/php/8.3/language.oop5.paamayim-nekudotayim.html
PREV
1
NEXT