« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 8 of about 8 for isOptional (0.001 sec.)
ReflectionParameter::isOptional — 省略可能であるかどうかを調べる | PHP 8.3 13339
ReflectionParameter::isOptional (PHP 5 >= 5.0.3, PHP 7, PHP 8) ReflectionParameter::isOptional — 省略可能であるかどうかを調べる 説明 public function ReflectionParameter::isOptional (): bool パラメータが省略可能であるかどうかを調べます。 パラ ...
https://man.mtool.work/php/8.3/reflectionparameter.isoptional.html
ReflectionParameter::getDefaultValue — パラメータのデフォルト値を取得する | PHP... 9452
ReflectionParameter::getDefaultValue (PHP 5 >= 5.0.3, PHP 7, PHP 8) ReflectionParameter::getDefaultValue — パラメータのデフォルト値を取得する 説明 public function ReflectionParameter::getDefaultValue (): mixed (内部またはユーザー定義の) 関数 ... ' ); foreach ( $function -> getParameters () as $param ) { echo 'Name: ' . $param -> getName () . PHP_EOL ; if ( $param -> isOptional ()) { echo 'Default value: ' . $param -> getDefaultValue () . PHP_EOL ; } echo PHP_EOL ; } ?> 上の例の出力は以下となります ... 。 Name: test Name: bar Default value: baz 参考 ReflectionParameter::isOptional() - 省略可能であるかどうかを調べる ReflectionParameter::isDefaultValueAvailable() - デフォルト値が存在するかどうかを調べる ...
https://man.mtool.work/php/8.3/reflectionparameter.getdefaultvalue.html
ReflectionParameter::getDefaultValueConstantName — デフォルト値が定数あるいは n... 9308
ReflectionParameter::getDefaultValueConstantName (PHP 5 >= 5.4.6, PHP 7, PHP 8) ReflectionParameter::getDefaultValueConstantName — デフォルト値が定数あるいは null の場合に、その定数名を返す 説明 public function ReflectionParameter::getDefau ... ' ); foreach ( $function -> getParameters () as $param ) { echo 'Name: ' . $param -> getName () . PHP_EOL ; if ( $param -> isOptional ()) { echo 'Default value: ' . $param -> getDefaultValueConstantName () . PHP_EOL ; } echo PHP_EOL ; } ?> 上の例の出力は以 ... 下となります。 Name: test Name: bar Default value: PHP_INT_MIN 参考 ReflectionParameter::isOptional() - 省略可能であるかどうかを調べる ReflectionParameter::isDefaultValueConstant() - このパラメータのデフォルト値が定数かどう ...
https://man.mtool.work/php/8.3/reflectionparameter.getdefaultvalueconstantname.h...
ReflectionParameter クラス | PHP 8.3 8711
ReflectionParameter クラス (PHP 5, PHP 7, PHP 8) はじめに ReflectionParameter クラスは、 関数またはメソッドのパラメータに関する情報を取得します。 関数パラメータの内部を調べる際には、まず ReflectionFunction クラスまたは ReflectionMethod クラ ... (): bool public function isDefaultValueAvailable (): bool public function isDefaultValueConstant (): bool public function isOptional (): bool public function isPassedByReference (): bool public function isPromoted (): bool public function isVariadic (): b ... を調べる ReflectionParameter::isDefaultValueConstant — このパラメータのデフォルト値が定数かどうかを返す ReflectionParameter::isOptional — 省略可能であるかどうかを調べる ReflectionParameter::isPassedByReference — 参照渡しかどうかを調べる ReflectionParameter:: ...
https://man.mtool.work/php/8.3/class.reflectionparameter.html
ReflectionParameter::allowsNull — null を許可するかどうかを調べる | PHP 8.3 8711
ReflectionParameter::allowsNull (PHP 5, PHP 7, PHP 8) ReflectionParameter::allowsNull — null を許可するかどうかを調べる 説明 public function ReflectionParameter::allowsNull (): bool パラメータが null を許可するかどうかを調べます。 パラメータ ... はパラメータはありません。 戻り値 null を許可する場合に true 、それ以外の場合に false を返します。 参考 ReflectionParameter::isOptional() - 省略可能であるかどうかを調べる ...
https://man.mtool.work/php/8.3/reflectionparameter.allowsnull.html
ReflectionParameter::isArray — 配列を受け取るパラメータであるかどうかを調べる |... 7970
ReflectionParameter::isArray (PHP 5 >= 5.1.2, PHP 7, PHP 8) ReflectionParameter::isArray — 配列を受け取るパラメータであるかどうかを調べる 警告 この関数は PHP 8.0.0 で 非推奨 になります。この関数に頼らないことを強く推奨します。 配列を受け取る ... n_array ( 'array' , array_map (fn( ReflectionNamedType $t ) => $t -> getName (), $types )); } ?> 参考 ReflectionParameter::isOptional() - 省略可能であるかどうかを調べる ...
https://man.mtool.work/php/8.3/reflectionparameter.isarray.html
ReflectionParameter::__construct — コンストラクタ | PHP 8.3 7808
ReflectionParameter::__construct (PHP 5, PHP 7, PHP 8) ReflectionParameter::__construct — コンストラクタ 説明 public function ReflectionParameter::__construct ( string | array | object $function , int | string $param ) ReflectionParameter ク ... aram ) { printf ( "-- Parameter #%d: %s {\n" . " Class: %s\n" . " Allows NULL: %s\n" . " Passed to by reference: %s\n" . " Is optional?: %s\n" . "}\n" , $i , // $param->getPosition() can be used $param -> getName (), var_export ( $param -> getClass (), 1 ) ... , var_export ( $param -> allowsNull (), 1 ), var_export ( $param -> isPassedByReference (), 1 ), $param -> isOptional () ? 'yes' : 'no' ); } ?> 上の例の出力は、 たとえば以下のようになります。 Function [ <user> function foo ] { @@ /Users/phi ... > $b ] Parameter #2 [ <required> $c ] } } -- Parameter #0: a { Class: NULL Allows NULL: true Passed to by reference: false Is optional?: no } -- Parameter #1: b { Class: NULL Allows NULL: true Passed to by reference: false Is optional?: no } -- Parameter # ...
https://man.mtool.work/php/8.3/reflectionparameter.construct.html
リフレクション | PHP 8.3 6922
リフレクション はじめに PHP には完全なリフレクション API が付属しており、 クラス、インターフェイス、関数、メソッド、そして拡張モジュールについて 型やプロパティを実行時に調べることができます。 さらに、このリフレクション API は関数、クラス、メ ... を調べる ReflectionParameter::isDefaultValueConstant — このパラメータのデフォルト値が定数かどうかを返す ReflectionParameter::isOptional — 省略可能であるかどうかを調べる ReflectionParameter::isPassedByReference — 参照渡しかどうかを調べる ReflectionParameter:: ...
https://man.mtool.work/php/8.3/book.reflection.html
PREV 1 NEXT