Results of 1 - 10 of about 294 for stdClass (0.008 sec.)
- stdClass クラス 8678
- « Closure::getCurrent Generator » PHP Manual 定義済みのインターフェイスとクラス stdClass クラス 検索 stdClass クラス (PHP 4, PHP 5, PHP 7, PHP 8) はじめに 動的なプロパティが使える、汎用的な空のクラスです。 このクラスのインスタンスは、 new 演
... は必要ありません。 PHP には全てのクラスの親となる基底クラスの概念がないため、 このクラスは基底クラスではありません。 ただ、 stdClass を継承させることで、 動的なプロパティの機能を持ったカスタムクラスを結果的に作ることはできます。 クラス概要 #[ \AllowDynami ... cProperties ] class stdClass { } このクラスは、メソッドやデフォルトのプロパティを持っていません。 例 例1 オブジェクトへの型変換を使い、stdClass を作る ... <?php $obj = (object) array( 'foo' => 'bar' ); var_dump ( $obj ); 上の例の出力は以下となります。 object(stdClass)#1 (1) { ["foo"]=> string(3) "bar" } 例2 json_decode() によって、stdClass を作る <?php $json = '{"foo":"bar"}' ; var_dump ...
-
https://man.mtool.work/php/8.3/class.stdclass.html
- stdClass クラス 8630
- « Closure::getCurrent Generator » PHP Manual 定義済みのインターフェイスとクラス stdClass クラス 検索 stdClass クラス (PHP 4, PHP 5, PHP 7, PHP 8) はじめに 動的なプロパティが使える、汎用的な空のクラスです。 このクラスのインスタンスは、 new 演
... は必要ありません。 PHP には全てのクラスの親となる基底クラスの概念がないため、 このクラスは基底クラスではありません。 ただ、 stdClass を継承させることで、 動的なプロパティの機能を持ったカスタムクラスを結果的に作ることはできます。 クラス概要 #[ \AllowDynami ... cProperties ] class stdClass { } このクラスは、メソッドやデフォルトのプロパティを持っていません。 例 例1 オブジェクトへの型変換を使い、stdClass を作る ... <?php $obj = (object) array( 'foo' => 'bar' ); var_dump ( $obj ); 上の例の出力は以下となります。 object(stdClass)#1 (1) { ["foo"]=> string(3) "bar" } 例2 json_decode() によって、stdClass を作る <?php $json = '{"foo":"bar"}' ; var_dump ...
-
https://man.mtool.work/php/8.3/class.stdclass.html
- Serialization and deserialization of PHP variables into MongoDB 8259
- « Connections Security » PHP Manual Driver Architecture and Internals Serialization and deserialization of PHP variables into MongoDB 検索 Serialization and deserialization of PHP variables into MongoDB This document discusses how compound
... e examples are extracts of a full document, and represent only one value inside a document. Objects If an object is of the stdClass class, serialize as a BSON document . If an object is a supported class that implements MongoDB\BSON\Type , then use the B ... nts the MongoDB\BSON\Serializable interface, call MongoDB\BSON\Serializable::bsonSerialize() and use the returned array or stdClass to serialize as a BSON document or array. The BSON type will be determined by the following: Root documents must be serial ... rns a packed array, serialize as a BSON array. If MongoDB\BSON\Serializable::bsonSerialize() returns a non-packed array or stdClass , serialize as a BSON document. If MongoDB\BSON\Serializable::bsonSerialize() did not return an array or stdClass , throw ...
-
https://man.mtool.work/php/8.3/mongodb.persistence.html
- Serialization and deserialization of PHP variables into MongoDB 8050
- « Connections Security » PHP Manual Driver Architecture and Internals Serialization and deserialization of PHP variables into MongoDB 検索 Serialization and deserialization of PHP variables into MongoDB This document discusses how compound
... e examples are extracts of a full document, and represent only one value inside a document. Objects If an object is of the stdClass class, serialize as a BSON document . If an object is a supported class that implements MongoDB\BSON\Type , then use the B ... nts the MongoDB\BSON\Serializable interface, call MongoDB\BSON\Serializable::bsonSerialize() and use the returned array or stdClass to serialize as a BSON document or array. The BSON type will be determined by the following: Root documents must be serial ... rns a packed array, serialize as a BSON array. If MongoDB\BSON\Serializable::bsonSerialize() returns a non-packed array or stdClass , serialize as a BSON document. If MongoDB\BSON\Serializable::bsonSerialize() did not return an array or stdClass , throw ...
-
https://man.mtool.work/php/8.3/mongodb.persistence.html
- Manipulation 7726
- « Threaded::isTerminated Threaded::notify » PHP Manual Threaded Manipulation 検索 Threaded::merge (PECL pthreads >= 2.0.0) Threaded::merge — Manipulation 説明 public function Threaded::merge ( mixed $from , bool $overwrite = ? ): bool Merge
... the property table of a threaded object <?php $array = []; while ( count ( $array ) < 10 ) $array [] = count ( $array ); $stdClass = new stdClass (); $stdClass -> foo = "foo" ; $stdClass -> bar = "bar" ; $stdClass -> baz = "baz" ; $safe = new Threaded ( ... ); $safe -> merge ( $array ); $safe -> foo = "bar" ; $safe -> merge ( $stdClass , false ); var_dump ( $safe ); ?> 上の例の出力は以下となります。 object(Threaded)#2 (13) { ["0"]=> int(0) ["1"]=> int(1) [ ... int(9) ["foo"]=> string(3) "bar" ["bar"]=> string(3) "bar" ["baz"]=> string(3) "baz" } 関連キーワード: int Threaded merge stdClass bar array safe foo baz Manipulation object string bool overwrite data true 場合 false count new ...
-
https://man.mtool.work/php/8.3/threaded.merge.html
- Manipulation 7726
- « Threaded::isTerminated Threaded::notify » PHP Manual Threaded Manipulation 検索 Threaded::merge (PECL pthreads >= 2.0.0) Threaded::merge — Manipulation 説明 public function Threaded::merge ( mixed $from , bool $overwrite = ? ): bool Merge
... the property table of a threaded object <?php $array = []; while ( count ( $array ) < 10 ) $array [] = count ( $array ); $stdClass = new stdClass (); $stdClass -> foo = "foo" ; $stdClass -> bar = "bar" ; $stdClass -> baz = "baz" ; $safe = new Threaded ( ... ); $safe -> merge ( $array ); $safe -> foo = "bar" ; $safe -> merge ( $stdClass , false ); var_dump ( $safe ); ?> 上の例の出力は以下となります。 object(Threaded)#2 (13) { ["0"]=> int(0) ["1"]=> int(1) [ ... "]=> int(9) ["foo"]=> string(3) "bar" ["bar"]=> string(3) "bar" ["baz"]=> string(3) "baz" } 関連キーワード: Threaded merge stdClass safe Manipulation overwrite count isTerminated notify pthreads mixed Merges current Overwrite existing keys default 成功 M ...
-
https://man.mtool.work/php/8.3/threaded.merge.html
- Returns an object for BSON serialization 7251
- « MongoDB\Driver\ReadPreference MongoDB\Driver\ReadPreference::__construct » PHP Manual MongoDB\Driver\ReadPreference Returns an object for BSON serialization 検索 MongoDB\Driver\ReadPreference::bsonSerialize (mongodb >=1.2.0) MongoDB\Drive
... ize — Returns an object for BSON serialization 説明 final public function MongoDB\Driver\ReadPreference::bsonSerialize (): stdClass パラメータ この関数にはパラメータはありません。 戻り値 Returns an object for serializing the ReadPreference as BSON. エラー ... oDB\BSON\Document :: fromPHP ( $rp )-> toRelaxedExtendedJSON (); ?> 上の例の出力は、 たとえば以下のようになります。 object(stdClass)#2 (1) { ["mode"]=> string(7) "primary" } { "mode" : "primary" } 例2 MongoDB\Driver\ReadPreference::bsonSerialize() with s ... oDB\BSON\Document :: fromPHP ( $rp )-> toRelaxedExtendedJSON (); ?> 上の例の出力は、 たとえば以下のようになります。 object(stdClass)#2 (2) { ["mode"]=> string(9) "secondary" ["tags"]=> array(3) { [0]=> object(stdClass)#1 (1) { ["dc"]=> string(2) "ny" } [ ...
-
https://man.mtool.work/php/8.3/mongodb-driver-readpreference.bsonserialize.html
- Returns an object for BSON serialization 7251
- « MongoDB\Driver\ReadPreference MongoDB\Driver\ReadPreference::__construct » PHP Manual MongoDB\Driver\ReadPreference Returns an object for BSON serialization 検索 MongoDB\Driver\ReadPreference::bsonSerialize (mongodb >=1.2.0) MongoDB\Drive
... ize — Returns an object for BSON serialization 説明 final public function MongoDB\Driver\ReadPreference::bsonSerialize (): stdClass パラメータ この関数にはパラメータはありません。 戻り値 Returns an object for serializing the ReadPreference as BSON. エラー ... oDB\BSON\Document :: fromPHP ( $rp )-> toRelaxedExtendedJSON (); ?> 上の例の出力は、 たとえば以下のようになります。 object(stdClass)#2 (1) { ["mode"]=> string(7) "primary" } { "mode" : "primary" } 例2 MongoDB\Driver\ReadPreference::bsonSerialize() with s ... oDB\BSON\Document :: fromPHP ( $rp )-> toRelaxedExtendedJSON (); ?> 上の例の出力は、 たとえば以下のようになります。 object(stdClass)#2 (2) { ["mode"]=> string(9) "secondary" ["tags"]=> array(3) { [0]=> object(stdClass)#1 (1) { ["dc"]=> string(2) "ny" } [ ...
-
https://man.mtool.work/php/8.3/mongodb-driver-readpreference.bsonserialize.html
- 型演算子 6670
- « 配列演算子 パイプ演算子 » PHP Manual 演算子 型演算子 検索 型演算子 instanceof を使用して、 ある PHP 変数が特定の クラス のオブジェクトのインスタンスであるかどうかを調べます。 例1 クラスでの instanceof の使用法 <?php class MyClass { } clas
... クトがクラスのインスタンスで ない かどうかを調べる方法 <?php class MyClass { } $a = new MyClass ; var_dump (!( $a instanceof stdClass )); ?> 上の例の出力は以下となります。 bool(true) 最後に、 instanceof は、ある変数が特定の インターフェイス を実装したクラス ... た。 例6 instanceof での他の変数の調べかた <?php $a = 1 ; $b = NULL ; $c = fopen ( '/tmp/' , 'r' ); var_dump ( $a instanceof stdClass ); // $a は整数です var_dump ( $b instanceof stdClass ); // $b は NULL です var_dump ( $c instanceof stdClass ); // $c はリ ... ソースです var_dump ( FALSE instanceof stdClass ); ?> 上の例の出力は以下となります。 bool(false) bool(false) bool(false) PHP Fatal error: instanceof expects an object ins ...
-
https://man.mtool.work/php/8.3/language.operators.type.html
- 型演算子 6613
- « 配列演算子 パイプ演算子 » PHP Manual 演算子 型演算子 検索 型演算子 instanceof を使用して、 ある PHP 変数が特定の クラス のオブジェクトのインスタンスであるかどうかを調べます。 例1 クラスでの instanceof の使用法 <?php class MyClass { } clas
... クトがクラスのインスタンスで ない かどうかを調べる方法 <?php class MyClass { } $a = new MyClass ; var_dump (!( $a instanceof stdClass )); ?> 上の例の出力は以下となります。 bool(true) 最後に、 instanceof は、ある変数が特定の インターフェイス を実装したクラス ... た。 例6 instanceof での他の変数の調べかた <?php $a = 1 ; $b = NULL ; $c = fopen ( '/tmp/' , 'r' ); var_dump ( $a instanceof stdClass ); // $a は整数です var_dump ( $b instanceof stdClass ); // $b は NULL です var_dump ( $c instanceof stdClass ); // $c はリ ... ソースです var_dump ( FALSE instanceof stdClass ); ?> 上の例の出力は以下となります。 bool(false) bool(false) bool(false) PHP Fatal error: instanceof expects an object ins ...
-
https://man.mtool.work/php/8.3/language.operators.type.html