« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 1 of about 1 for staticValue (0.000 sec.)
static キーワード | PHP 8.3 9414
static キーワード ヒント このページでは、 static キーワードを使って static メソッド や static プロパティを定義する方法を説明します。 static は、 static 変数 や static な無名関数 、そして 遅延静的束縛 にも使えます。これらの場合の static の使 ... を指定することはできません。 例2 static プロパティの例 <?php class Foo { public static $my_static = 'foo' ; public function staticValue () { return self :: $my_static ; } } class Bar extends Foo { public function fooStatic () { return parent :: $my_static ; ... } } print Foo :: $my_static . "\n" ; $foo = new Foo (); print $foo -> staticValue () . "\n" ; print $foo -> my_static . "\n" ; // Undefined "Property" my_static print $foo :: $my_static . "\n" ; $classnam ...
https://man.mtool.work/php/8.3/language.oop5.static.html
PREV 1 NEXT