« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 164 for closure (0.002 sec.)
Closure クラス 9015
« Serializable::unserialize Closure::__construct » PHP Manual 定義済みのインターフェイスとクラス Closure クラス 検索 Closure クラス (PHP 5 >= 5.3.0, PHP 7, PHP 8) はじめに 無名関数 を表すために使うクラスです。 無名関数は、Closure 型のオブジ ... 装した他のクラスとの一貫性を保つためのものであり、 関数をコールするときにこのメソッドは使われません。 クラス概要 final class Closure { /* メソッド */ private function __construct () public static function bind ( Closure $closure , ? object $newThis , obje ... ct | string | null $newScope = "static" ): ? Closure public function bindTo ( ? object $newThis , object | string | null $newScope = "static" ): ? Closure public function call ... ( object $newThis , mixed ...$args ): mixed public static function fromCallable ( callable $callback ): Closure public static function getCurrent (): Closure } 変更履歴 バージョン 説明 8.4.0 Closure::__debugInfo() の出力に、 クロージャ ...
https://man.mtool.work/php/8.3/class.closure.html
Closure クラス 9015
« Serializable::unserialize Closure::__construct » PHP Manual 定義済みのインターフェイスとクラス Closure クラス 検索 Closure クラス (PHP 5 >= 5.3.0, PHP 7, PHP 8) はじめに 無名関数 を表すために使うクラスです。 無名関数は、Closure 型のオブジ ... 装した他のクラスとの一貫性を保つためのものであり、 関数をコールするときにこのメソッドは使われません。 クラス概要 final class Closure { /* メソッド */ private function __construct () public static function bind ( Closure $closure , ? object $newThis , obje ... ct | string | null $newScope = "static" ): ? Closure public function bindTo ( ? object $newThis , object | string | null $newScope = "static" ): ? Closure public function call ... ( object $newThis , mixed ...$args ): mixed public static function fromCallable ( callable $callback ): Closure public static function getCurrent (): Closure } 変更履歴 バージョン 説明 8.4.0 Closure::__debugInfo() の出力に、 クロージャ ...
https://man.mtool.work/php/8.3/class.closure.html
バインドされたオブジェクトとクラスのスコープでクロージャを複製する 8878
« Closure::__construct Closure::bindTo » PHP Manual Closure バインドされたオブジェクトとクラスのスコープでクロージャを複製する 検索 Closure::bind (PHP 5 >= 5.4.0, PHP 7, PHP 8) Closure::bind — バインドされたオブジェクトとクラスのスコープでク ... ロージャを複製する 説明 public static function Closure::bind ( Closure $closure , ? object $newThis , object | string | null $newScope = "static" ): ? Closure このメソッドは、st ... aticメソッド版の Closure::bindTo() です。 詳細な説明は Closure::bindTo() のドキュメントを参照ください。 パラメータ closure バインドする無名関数。 n ... private メソッドのアクセス権を決めます。 このパラメータに、内部クラスのオブジェクトを渡すことはできません。 戻り値 新しい Closure オブジェクトを返します。 失敗した場合は null を返します。 変更履歴 バージョン 説明 8.5.0 インスタンスを static なクロージャ ...
https://man.mtool.work/php/8.3/closure.bind.html
バインドされたオブジェクトとクラスのスコープでクロージャを複製する 8878
« Closure::__construct Closure::bindTo » PHP Manual Closure バインドされたオブジェクトとクラスのスコープでクロージャを複製する 検索 Closure::bind (PHP 5 >= 5.4.0, PHP 7, PHP 8) Closure::bind — バインドされたオブジェクトとクラスのスコープでク ... ロージャを複製する 説明 public static function Closure::bind ( Closure $closure , ? object $newThis , object | string | null $newScope = "static" ): ? Closure このメソッドは、st ... aticメソッド版の Closure::bindTo() です。 詳細な説明は Closure::bindTo() のドキュメントを参照ください。 パラメータ closure バインドする無名関数。 n ... private メソッドのアクセス権を決めます。 このパラメータに、内部クラスのオブジェクトを渡すことはできません。 戻り値 新しい Closure オブジェクトを返します。 失敗した場合は null を返します。 変更履歴 バージョン 説明 8.5.0 インスタンスを static なクロージャ ...
https://man.mtool.work/php/8.3/closure.bind.html
クロージャを束縛して呼び出す 8685
« Closure::bindTo Closure::fromCallable » PHP Manual Closure クロージャを束縛して呼び出す 検索 Closure::call (PHP 7, PHP 8) Closure::call — クロージャを束縛して呼び出す 説明 public function Closure::call ( object $newThis , mixed ...$args ) ... オブジェクト。 args クロージャに渡すパラメータがある場合は、ここで指定します。 戻り値 クロージャの戻り値を返します。 例 例1 Closure::call() の例 <?php class Value { protected $value ; public function __construct ( $value ) { $this -> value = $value ; } p ... ublic function getValue () { return $this -> value ; } } $three = new Value ( 3 ); $four = new Value ( 4 ); $closure = function ( $delta ) { var_dump ( $this -> getValue () + $delta ); }; $closure -> call ( $three , 4 ); $closure -> call ( ... $four , 4 ); ?> 上の例の出力は以下となります。 int(7) int(8) 関連キーワード: クロージャ Closure call 束縛 value function newThis パラメータ Value closure mixed args 戻り値 getValue three new four delta int bindTo ...
https://man.mtool.work/php/8.3/closure.call.html
クロージャを束縛して呼び出す 8685
« Closure::bindTo Closure::fromCallable » PHP Manual Closure クロージャを束縛して呼び出す 検索 Closure::call (PHP 7, PHP 8) Closure::call — クロージャを束縛して呼び出す 説明 public function Closure::call ( object $newThis , mixed ...$args ) ... オブジェクト。 args クロージャに渡すパラメータがある場合は、ここで指定します。 戻り値 クロージャの戻り値を返します。 例 例1 Closure::call() の例 <?php class Value { protected $value ; public function __construct ( $value ) { $this -> value = $value ; } p ... ublic function getValue () { return $this -> value ; } } $three = new Value ( 3 ); $four = new Value ( 4 ); $closure = function ( $delta ) { var_dump ( $this -> getValue () + $delta ); }; $closure -> call ( $three , 4 ); $closure -> call ( ... $four , 4 ); ?> 上の例の出力は以下となります。 int(7) int(8) 関連キーワード: クロージャ Closure call 束縛 newThis closure mixed args getValue three four delta bindTo fromCallable 一時的 protected construct return dump ...
https://man.mtool.work/php/8.3/closure.call.html
現在実行中のクロージャを返す 8480
« Closure::fromCallable stdClass » PHP Manual Closure 現在実行中のクロージャを返す 検索 Closure::getCurrent (PHP 8 >= 8.5.0) Closure::getCurrent — 現在実行中のクロージャを返す 説明 public static function Closure::getCurrent (): Closure 現在 ... ドはクロージャの内部から呼び出す必要があります。 クロージャのコンテキスト外から呼び出すと、 Error: Current function is not a closure. が発生します。 パラメータ この関数にはパラメータはありません。 戻り値 現在実行中の Closure を返します。 エラー / 例外 クロ ... ージャのコンテキスト外から呼び出された場合、 Error をスローします。 例 例1 Closure::getCurrent() の例 Closure::getCurrent() を使って 再帰的なフィボナッチ関数を実装する例: <?php $fibonacci = function ( int ... $n ) { if ( $n === 0 || $n === 1 ) { return $n ; } $fn = Closure :: getCurrent (); return $fn ( $n - 1 ) + $fn ( $n - 2 ); }; echo $fibonacci ( 10 ); // 出力: 55 ?> 例2 従来のアプローチと ...
https://man.mtool.work/php/8.3/closure.getcurrent.html
現在実行中のクロージャを返す 8206
« Closure::fromCallable stdClass » PHP Manual Closure 現在実行中のクロージャを返す 検索 Closure::getCurrent (PHP 8 >= 8.5.0) Closure::getCurrent — 現在実行中のクロージャを返す 説明 public static function Closure::getCurrent (): Closure 現在 ... ドはクロージャの内部から呼び出す必要があります。 クロージャのコンテキスト外から呼び出すと、 Error: Current function is not a closure. が発生します。 パラメータ この関数にはパラメータはありません。 戻り値 現在実行中の Closure を返します。 エラー / 例外 クロ ... ージャのコンテキスト外から呼び出された場合、 Error をスローします。 例 例1 Closure::getCurrent() の例 Closure::getCurrent() を使って 再帰的なフィボナッチ関数を実装する例: <?php $fibonacci = function ( int ... $n ) { if ( $n === 0 || $n === 1 ) { return $n ; } $fn = Closure :: getCurrent (); return $fn ( $n - 1 ) + $fn ( $n - 2 ); }; echo $fibonacci ( 10 ); // 出力: 55 ?> 例2 従来のアプローチと ...
https://man.mtool.work/php/8.3/closure.getcurrent.html
コードポイントの FC_NFKC_Closure プロパティの値を取得する 8081
« IntlChar::getCombiningClass IntlChar::getIntPropertyMaxValue » PHP Manual IntlChar コードポイントの FC_NFKC_Closure プロパティの値を取得する 検索 IntlChar::getFC_NFKC_Closure (PHP 7, PHP 8) IntlChar::getFC_NFKC_Closure — コードポイントの ... FC_NFKC_Closure プロパティの値を取得する 説明 public static function IntlChar::getFC_NFKC_Closure ( int | string $codepoint ): string | fa ... lse | null コードポイントの FC_NFKC_Closure プロパティの値を文字列で取得します。 パラメータ codepoint コードポイントを表す int 型の値 (例: U+2603 SNOWMAN を表す 0x260 ... 3 )、あるいは UTF-8 文字列としてエンコードされた文字 (例: "\u{2603}" )。 戻り値 codepoint の FC_NFKC_Closure プロパティの値を文字列で返します。 値が存在しない場合は、空文字列を返します。 失敗した場合は、 null または false を返します ...
https://man.mtool.work/php/8.3/intlchar.getfc-nfkc-closure.html
コードポイントの FC_NFKC_Closure プロパティの値を取得する 8046
« IntlChar::getCombiningClass IntlChar::getIntPropertyMaxValue » PHP Manual IntlChar コードポイントの FC_NFKC_Closure プロパティの値を取得する 検索 IntlChar::getFC_NFKC_Closure (PHP 7, PHP 8) IntlChar::getFC_NFKC_Closure — コードポイントの ... FC_NFKC_Closure プロパティの値を取得する 説明 public static function IntlChar::getFC_NFKC_Closure ( int | string $codepoint ): string | fa ... lse | null コードポイントの FC_NFKC_Closure プロパティの値を文字列で取得します。 パラメータ codepoint コードポイントを表す int 型の値 (例: U+2603 SNOWMAN を表す 0x260 ... 3 )、あるいは UTF-8 文字列としてエンコードされた文字 (例: "\u{2603}" )。 戻り値 codepoint の FC_NFKC_Closure プロパティの値を文字列で返します。 値が存在しない場合は、空文字列を返します。 失敗した場合は、 null または false を返します ...
https://man.mtool.work/php/8.3/intlchar.getfc-nfkc-closure.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT