Results of 1 - 2 of about 2 for withX (0.001 sec.)
- オブジェクトのクローン作成 11228
- « finalキーワード オブジェクトの比較 » PHP Manual クラスとオブジェクト オブジェクトのクローン作成 検索 オブジェクトのクローン作成 オブジェクトのコピーを作成する際、そのプロパティも全て二重化することが、 常に望ましい動作であるわけではありませ
... る <?php class Point { public function __construct ( public readonly int $x , public readonly int $y , ) {} public function withX ( int $x ): static { return clone( $this , [ 'x' => $x ]); } } $p = new Point ( 1 , 2 ); $q = $p -> withX ( 10 ); echo $q ... インドウ MyCloneable print リファレンス instances readonly キーワード リソース static construct self メンバー dateTime Point withX final コンストラクタ 独立 ...
-
https://man.mtool.work/php/8.3/language.oop5.cloning.html
- オブジェクトのクローン作成 7485
- « finalキーワード オブジェクトの比較 » PHP Manual クラスとオブジェクト オブジェクトのクローン作成 検索 オブジェクトのクローン作成 オブジェクトのコピーを作成する際、そのプロパティも全て二重化することが、 常に望ましい動作であるわけではありませ
... る <?php class Point { public function __construct ( public readonly int $x , public readonly int $y , ) {} public function withX ( int $x ): static { return clone( $this , [ 'x' => $x ]); } } $p = new Point ( 1 , 2 ); $q = $p -> withX ( 10 ); echo $q ...
-
https://man.mtool.work/php/8.3/language.oop5.cloning.html
PREV
1
NEXT