Results of 1 - 10 of about 346 for exists (0.002 sec.)
- property_exists — オブジェクトもしくはクラスにプロパティが存在するかどうかを調... 9914
- property_exists (PHP 5 >= 5.1.0, PHP 7, PHP 8) property_exists — オブジェクトもしくはクラスにプロパティが存在するかどうかを調べる 説明 function property_exists ( object | string $object_or_class , string $property ): bool この関数は、与えら
... が 指定されたクラスに存在するかどうかを確認します。 注意 : 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 ( ... property_exists ( 'myClass' , 'xpto' )); //true } } var_dump ( property_exists ( 'myClass' , 'mine' )); //true var_dump ( property_exists ...
-
https://man.mtool.work/php/8.3/function.property-exists.html
- class_exists — クラスが定義済みかどうかを確認する | PHP 8.3 8742
- class_exists (PHP 4, PHP 5, PHP 7, PHP 8) class_exists — クラスが定義済みかどうかを確認する 説明 function class_exists ( string $class , bool $autoload = true ): bool この関数は指定したクラスが定義されているかどうかを調べます。 パラメータ c
... トロード するかどうか。 戻り値 クラス 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
- apcu_exists — エントリが存在するかどうかを調べる | PHP 8.3 8697
- apcu_exists (PECL apcu >= 4.0.0) apcu_exists — エントリが存在するかどうかを調べる 説明 function apcu_exists ( string | array $keys ): bool | array 指定した APCu エントリが存在するかどうかを調べます。 パラメータ keys キーを含む文字列、あるい
... 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
- enum_exists — 列挙型が定義されているかを調べる | PHP 8.3 8697
- enum_exists (PHP 8 >= 8.1.0) enum_exists — 列挙型が定義されているかを調べる 説明 function enum_exists ( string $enum , bool $autoload = true ): bool この関数は、指定された 列挙型 が定義されているかを調べます。 パラメータ enum 列挙型の名前。
... するかどうか。 戻り値 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() ...
-
https://man.mtool.work/php/8.3/function.enum-exists.html
- array_key_exists — 指定したキーまたは添字が配列にあるかどうかを調べる | PHP 8.3 8598
- array_key_exists (PHP 4 >= 4.0.7, PHP 5, PHP 7, PHP 8) array_key_exists — 指定したキーまたは添字が配列にあるかどうかを調べる 説明 function array_key_exists ( string | int | float | bool | resource | null $key , array $array ): bool 指定した
... key が配列に設定されている場合、 array_key_exists() は true を返します。 key は配列添字として使用できる全ての値を使用可能です。 パラメータ key 調べる値。 array キーが存在す ... るかどうかを調べたい配列。 戻り値 成功した場合に true を、失敗した場合に false を返します。 注意 : array_key_exists() は、最初のレベルのキーだけを捜します。 多次元配列のネストされたキーは、この関数では見つけられません。 変更履歴 バージョン ... object を渡すことは、 サポートされなくなりました。 7.4.0 array に object を渡すことは、 推奨されなくなりました。 property_exists() を代わりに使ってください。 例 例1 array_key_exists() の例 <?php $searchArray = [ 'first' => 1 , 'second' => 4 ]; var_dum ...
-
https://man.mtool.work/php/8.3/function.array-key-exists.html
- method_exists — クラスメソッドが存在するかどうかを確認する | PHP 8.3 8454
- 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) 注意 注意 : ... ラスに対しては登録済みの autoloader を使用します。 注意 : マジックメソッド __call を使ってアクセス可能なメソッドを、 method_exists() は検知できません。 参考 function_exists() - 指定した関数が定義されている場合に true を返す is_callable() - 引数が、現在の ...
-
https://man.mtool.work/php/8.3/function.method-exists.html
- Zookeeper::exists — Checks the existence of a node in zookeeper synchronously |... 8400
- Zookeeper::exists (PECL zookeeper >= 0.1.0) Zookeeper::exists — Checks the existence of a node in zookeeper synchronously 説明 public function Zookeeper::exists ( string $path , callable $watcher_cb = null ): array パラメータ path The name
... e changes. The watch will be set even if the node does not 戻り値 Returns the value of stat for the path if the given node exists, otherwise false. エラー / 例外 This method emits PHP error/warning when parameters count or types are wrong or fail to ch ... existence of a node. 警告 Since version 0.3.0, this method emits ZookeeperException and its derivatives. 例 例1 Zookeeper::exists() example Check the existence of a node. <?php $zookeeper = new Zookeeper ( 'localhost:2181' ); $path = '/path/to/node' ; ... $r = $zookeeper -> exists ( $path ); if ( $r ) echo 'EXISTS' ; else echo 'N/A or ERR' ; ?> 上の例の出力は以下となります。 EXISTS 参考 Zookeeper::get ...
-
https://man.mtool.work/php/8.3/zookeeper.exists.html
- QuickHashIntSet::exists — This method checks whether a key is part of the set |... 7715
- QuickHashIntSet::exists (PECL quickhash >= Unknown) QuickHashIntSet::exists — This method checks whether a key is part of the set 説明 public function QuickHashIntSet::exists ( int $key ): bool This method checks whether an entry with the p
... rovided key exists in the set. パラメータ key The key of the entry to check for whether it exists in the set. 戻り値 Returns true when the en ... try was found, or false when the entry is not found. 例 例1 QuickHashIntSet::exists() example <?php //generate 200000 elements $array = range ( 0 , 199999 ); $existingEntries = array_rand ( array_flip ( $ar ... ey ); } echo "Doing 1000 tests: " , microtime ( true ), "\n" ; foreach( $testForEntries as $key ) { $foundCount += $set -> exists ( $key ); } echo "Done, $foundCount found: " , microtime ( true ), "\n" ; ?> 上の例の出力は、 たとえば以下のようになります ...
-
https://man.mtool.work/php/8.3/quickhashintset.exists.html
- QuickHashIntHash::exists — This method checks whether a key is part of the hash... 7625
- QuickHashIntHash::exists (PECL quickhash >= Unknown) QuickHashIntHash::exists — This method checks whether a key is part of the hash 説明 public function QuickHashIntHash::exists ( int $key ): bool This method checks whether an entry with t
... he provided key exists in the hash. パラメータ key The key of the entry to check for whether it exists in the hash. 戻り値 Returns true when the ... entry was found, or false when the entry is not found. 例 例1 QuickHashIntHash::exists() example <?php //generate 200000 elements $array = range ( 0 , 199999 ); $existingEntries = array_rand ( array_flip ( $ar ... 6 ); } echo "Doing 1000 tests: " , microtime ( true ), "\n" ; foreach( $testForEntries as $key ) { $foundCount += $hash -> exists ( $key ); } echo "Done, $foundCount found: " , microtime ( true ), "\n" ; ?> 上の例の出力は、 たとえば以下のようになります ...
-
https://man.mtool.work/php/8.3/quickhashinthash.exists.html
- QuickHashIntStringHash::exists — This method checks whether a key is part of th... 7571
- QuickHashIntStringHash::exists (PECL quickhash >= Unknown) QuickHashIntStringHash::exists — This method checks whether a key is part of the hash 説明 public function QuickHashIntStringHash::exists ( int $key ): bool This method checks wheth
... er an entry with the provided key exists in the hash. パラメータ key The key of the entry to check for whether it exists in the hash. 戻り値 Returns true when the ...
-
https://man.mtool.work/php/8.3/quickhashintstringhash.exists.html