« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 36 for reflectionType (0.001 sec.)
ReflectionType クラス | PHP 8.3 12171
ReflectionType クラス (PHP 7, PHP 8) はじめに ReflectionType クラスは、 関数の引数や戻り値の型、 またはクラスのプロパティの型に関する情報を報告します。 リフレクション拡張モジュールでは、以下のサブクラスが宣言されています。 ReflectionNamedTy ... PHP 7.1.0 以降) ReflectionUnionType (PHP 8.0.0 以降) ReflectionIntersectionType (PHP 8.1.0 以降) クラス概要 abstract class ReflectionType implements Stringable { /* メソッド */ public function allowsNull (): bool public function __toString (): string } 変更履歴 ... バージョン 説明 8.0.0 ReflectionType は、抽象クラスになり、 ReflectionType::isBuiltin() は、 ReflectionNamedType::isBuiltin() に移動しました。 目次 ReflectionT ... ype::allowsNull — null が許されるかをチェックする ReflectionType::__toString — 文字列に変換する ...
https://man.mtool.work/php/8.3/class.reflectiontype.html
ReflectionType::__toString — 文字列に変換する | PHP 8.3 11712
ReflectionType::__toString (PHP 7, PHP 8) ReflectionType::__toString — 文字列に変換する 説明 public function ReflectionType::__toString (): string 引数の型の名前を取得します。 パラメータ この関数にはパラメータはありません。 戻り値 引数の型を ... 返します。 変更履歴 バージョン 説明 8.0.0 ReflectionType::__toString() は非推奨ではなくなりました。 7.1.0 ReflectionType::__toString() は非推奨になりました。 例 例1 ReflectionType ... eflectionNamedType::getName() - 型の名前の文字列を取得する ReflectionNamedType::isBuiltin() - 組み込みの型であるかを調べる ReflectionType::allowsNull() - null が許されるかをチェックする ReflectionUnionType::getTypes() - union 型に含まれる型を返す。 ReflectionP ...
https://man.mtool.work/php/8.3/reflectiontype.tostring.html
ReflectionParameter::getType — 引数の型を取得する | PHP 8.3 11522
ReflectionParameter::getType (PHP 7, PHP 8) ReflectionParameter::getType — 引数の型を取得する 説明 public function ReflectionParameter::getType (): ? ReflectionType 引数の型を取得します。 パラメータ この関数にはパラメータはありません。 戻り ... 値 引数の型が指定されていれば ReflectionType オブジェクトを返します。 そうでなければ null を返します。 例 例1 PHP 7.1.0 以降での ReflectionParameter::getType() の使い方 ... PHP 7.1.0 以降では、 ReflectionType::__toString() が推奨されなくなったので、 ReflectionParameter::getType() は ReflectionNamedType を返す 可能性があります 。 ... {} $reflectionFunc = new ReflectionFunction ( 'someFunction' ); $reflectionParams = $reflectionFunc -> getParameters (); $reflectionType1 = $reflectionParams [ 0 ]-> getType (); $reflectionType2 = $reflectionParams [ 1 ]-> getType (); assert ( $reflectionType ...
https://man.mtool.work/php/8.3/reflectionparameter.gettype.html
ReflectionType::allowsNull — null が許されるかをチェックする | PHP 8.3 10349
ReflectionType::allowsNull (PHP 7, PHP 8) ReflectionType::allowsNull — null が許されるかをチェックする 説明 public function ReflectionType::allowsNull (): bool 引数が null を許容するかをチェックします。 パラメータ この関数にはパラメータはあ ... りません。 戻り値 null が許容されるなら true を、そうでないなら false を返します。 例 例1 ReflectionType::allowsNull() の例 <?php function someFunction ( string $param , stdClass $param2 = null ) {} $reflectionFunc = new Reflec ... 上の例の出力は以下となります。 bool(false) bool(true) 参考 ReflectionNamedType::isBuiltin() - 組み込みの型であるかを調べる ReflectionType::__toString() - 文字列に変換する ReflectionParameter::getType() - 引数の型を取得する ...
https://man.mtool.work/php/8.3/reflectiontype.allowsnull.html
ReflectionUnionType クラス | PHP 8.3 9493
ReflectionUnionType クラス (PHP 8) はじめに クラス概要 class ReflectionUnionType extends ReflectionType { /* メソッド */ public function getTypes (): array /* 継承したメソッド */ public function ReflectionType::allowsNull (): bool public fu ... nction ReflectionType::__toString (): string } 目次 ReflectionUnionType::getTypes — union 型に含まれる型を返す。 ...
https://man.mtool.work/php/8.3/class.reflectionuniontype.html
ReflectionIntersectionType クラス | PHP 8.3 9430
ReflectionIntersectionType クラス (PHP 8 >= 8.1.0) はじめに クラス概要 class ReflectionIntersectionType extends ReflectionType { /* メソッド */ public function getTypes (): array /* 継承したメソッド */ public function ReflectionType::allows ... Null (): bool public function ReflectionType::__toString (): string } 目次 ReflectionIntersectionType::getTypes — 交差型に含まれている型を返す ...
https://man.mtool.work/php/8.3/class.reflectionintersectiontype.html
ReflectionParameter::isArray — 配列を受け取るパラメータであるかどうかを調べる |... 9430
ReflectionParameter::isArray (PHP 5 >= 5.1.2, PHP 7, PHP 8) ReflectionParameter::isArray — 配列を受け取るパラメータであるかどうかを調べる 警告 この関数は PHP 8.0.0 で 非推奨 になります。この関数に頼らないことを強く推奨します。 配列を受け取る ... 列型を宣言しているかどうかを報告します。 <?php function declaresArray ( ReflectionParameter $reflectionParameter ): bool { $reflectionType = $reflectionParameter -> getType (); if (! $reflectionType ) return false ; $types = $reflectionType instanceof Reflectio ... nUnionType ? $reflectionType -> getTypes () : [ $reflectionType ]; return in_array ( 'array' , array_map (fn( ReflectionNamedType $t ) => $t -> getName ...
https://man.mtool.work/php/8.3/reflectionparameter.isarray.html
ReflectionParameter::isCallable — パラメータが callable かどうかを返す | PHP 8.... 9430
ReflectionParameter::isCallable (PHP 5 >= 5.4.0, PHP 7, PHP 8) ReflectionParameter::isCallable — パラメータが callable かどうかを返す 警告 この関数は PHP 8.0.0 で 非推奨 になります。この関数に頼らないことを強く推奨します。 パラメータが call ... e 型を受け取るかどうかを報告します。 <?php function declaresCallable ( ReflectionParameter $reflectionParameter ): bool { $reflectionType = $reflectionParameter -> getType (); if (! $reflectionType ) return false ; $types = $reflectionType instanceof Reflectio ... nUnionType ? $reflectionType -> getTypes () : [ $reflectionType ]; return in_array ( 'callable' , array_map (fn( ReflectionNamedType $t ) => $t -> getN ...
https://man.mtool.work/php/8.3/reflectionparameter.iscallable.html
ReflectionNamedType クラス | PHP 8.3 9239
ReflectionNamedType クラス (PHP 7 >= 7.1.0, PHP 8) はじめに クラス概要 class ReflectionNamedType extends ReflectionType { /* メソッド */ public function getName (): string public function isBuiltin (): bool /* 継承したメソッド */ public fun ... ction ReflectionType::allowsNull (): bool public function ReflectionType::__toString (): string } 目次 ReflectionNamedType::getName — 型の名前の ...
https://man.mtool.work/php/8.3/class.reflectionnamedtype.html
ReflectionClassConstant::getType — クラス定数の型を取得する | PHP 8.3 8780
ReflectionClassConstant::getType (PHP 8 >= 8.3.0) ReflectionClassConstant::getType — クラス定数の型を取得する 説明 public function ReflectionClassConstant::getType (): ? ReflectionType クラス定数に関連付けられた型を取得します。 パラメータ こ ... の関数にはパラメータはありません。 戻り値 定数に型が指定されている場合、 ReflectionType を返します。 指定されていない場合は、 null を返します。 参考 ReflectionClassConstant::hasType() - クラス定数に型が指定され ... ているかを調べる ReflectionType 他のマニュアルの関連ページ Linux JM HUGE_VAL(3) Linux JM HUGE_VALF(3) Linux JM NAN(3) Linux JM INFINITY(3) ...
https://man.mtool.work/php/8.3/reflectionclassconstant.gettype.html
PREV 1 2 3 4 NEXT