« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 740 for exists (0.002 sec.)
オブジェクトもしくはクラスにプロパティが存在するかどうかを調べる 7001
« method_exists trait_exists » PHP Manual クラス/オブジェクト関数 オブジェクトもしくはクラスにプロパティが存在するかどうかを調べる 検索 property_exists (PHP 5 >= 5.1.0, PHP 7, PHP 8) property_exists — オブジェクトもしくはクラスにプロパティが ... 存在するかどうかを調べる 説明 function property_exists ( object | string $object_or_class , string $property ): bool この関数は、与えられたプロパティ property が 指定されたクラス ... に存在するかどうかを確認します。 注意 : isset() とは対照的に、 プロパティの値が null の場合でも property_exists() は true を返します。 パラメータ object_or_class 確認するクラス名、もしくはクラスのオブジェクトを指定します。 property プ ... パティ名を指定します。 戻り値 プロパティが存在している場合は true 、存在していない場合に false を返します。 例 例1 property_exists() の例 <?php class myClass { public $mine ; private $xpto ; static protected $test ; static function test () { var_dump ( ...
https://man.mtool.work/php/8.3/function.property-exists.html
オブジェクトもしくはクラスにプロパティが存在するかどうかを調べる 7001
« method_exists trait_exists » PHP Manual クラス/オブジェクト関数 オブジェクトもしくはクラスにプロパティが存在するかどうかを調べる 検索 property_exists (PHP 5 >= 5.1.0, PHP 7, PHP 8) property_exists — オブジェクトもしくはクラスにプロパティが ... 存在するかどうかを調べる 説明 function property_exists ( object | string $object_or_class , string $property ): bool この関数は、与えられたプロパティ property が 指定されたクラス ... に存在するかどうかを確認します。 注意 : isset() とは対照的に、 プロパティの値が null の場合でも property_exists() は true を返します。 パラメータ object_or_class 確認するクラス名、もしくはクラスのオブジェクトを指定します。 property プ ... パティ名を指定します。 戻り値 プロパティが存在している場合は true 、存在していない場合に false を返します。 例 例1 property_exists() の例 <?php class myClass { public $mine ; private $xpto ; static protected $test ; static function test () { var_dump ( ...
https://man.mtool.work/php/8.3/function.property-exists.html
クラスが定義済みかどうかを確認する 6595
« class_alias enum_exists » PHP Manual クラス/オブジェクト関数 クラスが定義済みかどうかを確認する 検索 class_exists (PHP 4, PHP 5, PHP 7, PHP 8) class_exists — クラスが定義済みかどうかを確認する 説明 function class_exists ( string $class , ... トロード するかどうか。 戻り値 クラス class が定義されている場合に true 、 それ以外の場合に false を返します。 例 例1 class_exists() の例 <?php // クラスを使用する前に、それが存在するかどうかを調べます if ( class_exists ( 'MyClass' )) { $myclass = new M ... toload_register (function ( $class_name ) { include $class_name . '.php' ; // クラス宣言を含むかどうか確認する if (! class_exists ( $class_name , false )) { throw new LogicException ( "Unable to load class: $class_name " ); } }); if ( class_exists ( My ... Class ::class)) { $myclass = new MyClass (); } ?> 参考 function_exists() - 指定した関数が定義されている場合に true を返す enum_exists() - 列挙型が定義されているかを調べる interface_exists() - イ ...
https://man.mtool.work/php/8.3/function.class-exists.html
列挙型が定義されているかを調べる 6561
« class_exists get_called_class » PHP Manual クラス/オブジェクト関数 列挙型が定義されているかを調べる 検索 enum_exists (PHP 8 >= 8.1.0) enum_exists — 列挙型が定義されているかを調べる 説明 function enum_exists ( string $enum , bool $autoload ... するかどうか。 戻り値 enum が定義済みの列挙型である場合、 true を返します。そうでない場合、 false を返します。 例 例1 enum_exists() の例 <?php // Check that the enum exists before trying to use it if ( enum_exists ( Suit ::class)) { $myclass = Suit :: ... Hearts ; } ?> 参考 function_exists() - 指定した関数が定義されている場合に true を返す class_exists() - クラスが定義済みかどうかを確認する interface_exists() ... ターフェイスが宣言されているかどうかを確認する get_declared_classes() - 定義済のクラスの名前を配列として返す 関連キーワード: exists enum 列挙型 class 場合 クラス true get function bool autoload ロード Suit 確認 Search called オブジェクト string パラメータ ...
https://man.mtool.work/php/8.3/function.enum-exists.html
クラスが定義済みかどうかを確認する 6561
« class_alias enum_exists » PHP Manual クラス/オブジェクト関数 クラスが定義済みかどうかを確認する 検索 class_exists (PHP 4, PHP 5, PHP 7, PHP 8) class_exists — クラスが定義済みかどうかを確認する 説明 function class_exists ( string $class , ... トロード するかどうか。 戻り値 クラス class が定義されている場合に true 、 それ以外の場合に false を返します。 例 例1 class_exists() の例 <?php // クラスを使用する前に、それが存在するかどうかを調べます if ( class_exists ( 'MyClass' )) { $myclass = new M ... toload_register (function ( $class_name ) { include $class_name . '.php' ; // クラス宣言を含むかどうか確認する if (! class_exists ( $class_name , false )) { throw new LogicException ( "Unable to load class: $class_name " ); } }); if ( class_exists ( My ... Class ::class)) { $myclass = new MyClass (); } ?> 参考 function_exists() - 指定した関数が定義されている場合に true を返す enum_exists() - 列挙型が定義されているかを調べる interface_exists() - イ ...
https://man.mtool.work/php/8.3/function.class-exists.html
列挙型が定義されているかを調べる 6561
« class_exists get_called_class » PHP Manual クラス/オブジェクト関数 列挙型が定義されているかを調べる 検索 enum_exists (PHP 8 >= 8.1.0) enum_exists — 列挙型が定義されているかを調べる 説明 function enum_exists ( string $enum , bool $autoload ... するかどうか。 戻り値 enum が定義済みの列挙型である場合、 true を返します。そうでない場合、 false を返します。 例 例1 enum_exists() の例 <?php // Check that the enum exists before trying to use it if ( enum_exists ( Suit ::class)) { $myclass = Suit :: ... Hearts ; } ?> 参考 function_exists() - 指定した関数が定義されている場合に true を返す class_exists() - クラスが定義済みかどうかを確認する interface_exists() ... ターフェイスが宣言されているかどうかを確認する get_declared_classes() - 定義済のクラスの名前を配列として返す 関連キーワード: exists enum 列挙型 autoload ロード Suit 確認 called 大文字 小文字 区別 オート Check before trying myclass Hearts 参考 interface イ ...
https://man.mtool.work/php/8.3/function.enum-exists.html
クラスメソッドが存在するかどうかを確認する 6368
« is_subclass_of property_exists » PHP Manual クラス/オブジェクト関数 クラスメソッドが存在するかどうかを確認する 検索 method_exists (PHP 4, PHP 5, PHP 7, PHP 8) method_exists — クラスメソッドが存在するかどうかを確認する 説明 function method ... _exists ( object | string $object_or_class , string $method ): bool 指定した object_or_class にクラスメソッドが存在するかどうかを調 ... バージョン 説明 7.4.0 継承した private メソッドに対してこの関数を実行しても、 false を返すようになりました。 例 例1 method_exists() の例 <?php $directory = new Directory ( '.' ); var_dump ( method_exists ( $directory , 'read' )); ?> 上の例の出力は以下と ... なります。 bool(true) 例2 staticメソッドに対する method_exists() の例 <?php var_dump ( method_exists ( 'Directory' , 'read' )); ?> 上の例の出力は以下となります。 bool(true) 注意 注意 : ...
https://man.mtool.work/php/8.3/function.method-exists.html
クラスメソッドが存在するかどうかを確認する 6340
« is_subclass_of property_exists » PHP Manual クラス/オブジェクト関数 クラスメソッドが存在するかどうかを確認する 検索 method_exists (PHP 4, PHP 5, PHP 7, PHP 8) method_exists — クラスメソッドが存在するかどうかを確認する 説明 function method ... _exists ( object | string $object_or_class , string $method ): bool 指定した object_or_class にクラスメソッドが存在するかどうかを調 ... バージョン 説明 7.4.0 継承した private メソッドに対してこの関数を実行しても、 false を返すようになりました。 例 例1 method_exists() の例 <?php $directory = new Directory ( '.' ); var_dump ( method_exists ( $directory , 'read' )); ?> 上の例の出力は以下と ... なります。 bool(true) 例2 staticメソッドに対する method_exists() の例 <?php var_dump ( method_exists ( 'Directory' , 'read' )); ?> 上の例の出力は以下となります。 bool(true) 注意 注意 : ...
https://man.mtool.work/php/8.3/function.method-exists.html
エントリが存在するかどうかを調べる 6306
« apcu_entry apcu_fetch » PHP Manual APCu 関数 エントリが存在するかどうかを調べる 検索 apcu_exists (PECL apcu >= 4.0.0) apcu_exists — エントリが存在するかどうかを調べる 説明 function apcu_exists ( string | array $keys ): bool | array 指定し ... eys に配列を渡したときは、 存在するキーをすべて含む配列を返します。 どれも存在しない場合は空の配列を返します。 例 例1 apcu_exists() の例 <?php $fruit = 'apple' ; $veggie = 'carrot' ; apcu_store ( 'foo' , $fruit ); apcu_store ( 'bar' , $veggie ); if ( a ... pcu_exists ( 'foo' )) { echo "Foo exists: " ; echo apcu_fetch ( 'foo' ); } else { echo "Foo does not exist" ; } echo PHP_EOL ; if ( a ... pcu_exists ( 'baz' )) { echo "Baz exists." ; } else { echo "Baz does not exist" ; } echo PHP_EOL ; $ret = apcu_exists (array( 'foo' , ...
https://man.mtool.work/php/8.3/function.apcu-exists.html
エントリが存在するかどうかを調べる 6272
« apcu_entry apcu_fetch » PHP Manual APCu 関数 エントリが存在するかどうかを調べる 検索 apcu_exists (PECL apcu >= 4.0.0) apcu_exists — エントリが存在するかどうかを調べる 説明 function apcu_exists ( string | array $keys ): bool | array 指定し ... eys に配列を渡したときは、 存在するキーをすべて含む配列を返します。 どれも存在しない場合は空の配列を返します。 例 例1 apcu_exists() の例 <?php $fruit = 'apple' ; $veggie = 'carrot' ; apcu_store ( 'foo' , $fruit ); apcu_store ( 'bar' , $veggie ); if ( a ... pcu_exists ( 'foo' )) { echo "Foo exists: " ; echo apcu_fetch ( 'foo' ); } else { echo "Foo does not exist" ; } echo PHP_EOL ; if ( a ... pcu_exists ( 'baz' )) { echo "Baz exists." ; } else { echo "Baz does not exist" ; } echo PHP_EOL ; $ret = apcu_exists (array( 'foo' , ...
https://man.mtool.work/php/8.3/function.apcu-exists.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT