« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 197 for Empty (0.003 sec.)
empty — 変数が空であるかどうかを検査する | PHP 8.3 14793
empty (PHP 4, PHP 5, PHP 7, PHP 8) empty — 変数が空であるかどうかを検査する 説明 function empty ( mixed $var ): bool 変数が空であるかどうかを検査します。 変数が空であるとみなされるのは、変数が存在しない場合や 変数の値が false に等しい場合で ... す。 empty() は、変数が存在しない場合でも警告を発生させません。 このことは、多次元配列やチェインされたプロパティのような、 ネストされ ... たデータ構造であっても当てはまります。 パラメータ var チェックする変数 変数が存在しなくても警告は発生しません。 つまり、 empty() は本質的に !isset($var) || $var == false と同じことを簡潔に記述しているだけです。 戻り値 var が存在しない、 または空や0の ... なされる場合、 true を返します。 詳細は boolean への変換 を参照ください。 それ以外の場合は false を返します。 例 例1 簡単な empty() / isset() の比較 <?php $var = 0 ; // $var が空なのでtrueと評価されます if (empty( $var )) { echo '$var is either 0, empt ...
https://man.mtool.work/php/8.3/function.empty.html
RegexIterator::getPregFlags — 正規表現フラグを返す | PHP 8.3 9124
RegexIterator::getPregFlags (PHP 5 >= 5.2.0, PHP 7, PHP 8) RegexIterator::getPregFlags — 正規表現フラグを返す 説明 public function RegexIterator::getPregFlags (): int 正規表現フラグを返します。使用可能なフラグの一覧は RegexIterator::__const ... r = new RegexIterator ( $arrayIterator , '/\s/' , RegexIterator :: SPLIT ); $regexIterator -> setPregFlags ( PREG_SPLIT_NO_EMPTY | PREG_SPLIT_OFFSET_CAPTURE ); if ( $regexIterator -> getPregFlags () & PREG_SPLIT_NO_EMPTY ) { echo 'Ignoring empty piece ... s' ; } else { echo 'Not ignoring empty pieces' ; } ?> 上の例の出力は以下となります。 Ignoring empty pieces 参考 RegexIterator::setPregFlags() - 正規表現フラグを設 ...
https://man.mtool.work/php/8.3/regexiterator.getpregflags.html
Backward Incompatible Changes | PHP 8.3 8973
Backward Incompatible Changes PHP Core By-reference foreach after array compaction By-reference foreach loops may now visit previously skipped elements after array compaction. Internal pointers on deleted elements now move to the next survi ... ving element during copy-on-write. Null coalescing and empty() on magic properties ?? and empty() on a magic property no longer call __get() when __isset() has materialized the proper ... ion is reached, and the result for stateful __toString() implementations. Argument types are validated before checking for empty arrays or converting values, so an invalid later argument can suppress conversion side effects from earlier arrays. Values ... are not converted if any input array is empty. Form feed trimmed by default Form feed ( \f ) is now added to the default trimmed characters of trim() , rtrim() and ltri ...
https://man.mtool.work/php/8.3/migration86.incompatible.html
PHP の使いかた | PHP 8.3 7796
PHP の使いかた このセクションにはPHPスクリプトを書くにあたってよく問題となる事柄が 集められています。 PHP の関数のパラメータの順番を覚えられません。だって関数によってばらばらなんだもん。 あらゆるフォームから送信されたデータを扱うことができる ... ています。 $_POST を連想配列として ループすることでPOSTされた全ての値にアクセスできます。例えば、 foreach で単純にループして empty() で値をチェックし、 結果を出力します。 <?php $empty = $post = array(); foreach ( $_POST as $varname => $varvalue ) { if ( ... empty( $varvalue )) { $empty [ $varname ] = $varvalue ; } else { $post [ $varname ] = $varvalue ; } } print "<pre>" ; if (empty( $empty )) { print "Non ... e of the POSTed values are empty, posted:\n" ; var_dump ( $post ); } else { print "We have " . count ( $empty ) . " empty values\n" ; print "Posted:\n" ; v ...
https://man.mtool.work/php/8.3/faq.using.html
Ds\Collection::isEmpty — Returns whether the collection is empty | PHP 8.3 7709
Ds\Collection::isEmpty (PECL ds >= 1.0.0) Ds\Collection::isEmpty — Returns whether the collection is empty 説明 public function Ds\Collection::isEmpty (): bool Returns whether the collection is empty. パラメータ この関数にはパラメータはあり ... ません。 戻り値 Returns true if the collection is empty, false otherwise. 例 例1 Ds\Collection::isEmpty() example <?php $a = new \Ds\Vector ([ 1 , 2 , 3 ]); $b = new \Ds\Vector ( ... ); var_dump ( $a -> isEmpty ()); var_dump ( $b -> isEmpty ()); ?> 上の例の出力は、 たとえば以下のようになります。 bool(false) bool(true) ...
https://man.mtool.work/php/8.3/ds-collection.isempty.html
Ds\Deque::isEmpty — Returns whether the deque is empty | PHP 8.3 7709
Ds\Deque::isEmpty (PECL ds >= 1.0.0) Ds\Deque::isEmpty — Returns whether the deque is empty 説明 public function Ds\Deque::isEmpty (): bool Returns whether the deque is empty. パラメータ この関数にはパラメータはありません。 戻り値 Returns t ... rue if the deque is empty, false otherwise. 例 例1 Ds\Deque::isEmpty() example <?php $a = new \Ds\Deque ([ 1 , 2 , 3 ]); $b = new \Ds\Deque (); var_ ... dump ( $a -> isEmpty ()); var_dump ( $b -> isEmpty ()); ?> 上の例の出力は、 たとえば以下のようになります。 bool(false) bool(true) ...
https://man.mtool.work/php/8.3/ds-deque.isempty.html
The Parle\Stack class | PHP 8.3 7558
The Parle\Stack class (PECL parle >= 0.7.0) はじめに Parle\Stack is a LIFO stack. The elements are inserted and removed only from one end. クラス概要 class Parle\Stack { /* プロパティ */ public bool $ empty = true ; public int $ size = 0 ; ... public mixed $ top ; /* メソッド */ public function pop (): void public function push ( mixed $item ): void } プロパティ empty Whether the stack is empty, readonly. size Stack size, readonly. top Element on the top of the stack. 目次 Parle\Stack::po ...
https://man.mtool.work/php/8.3/class.parle-stack.html
Ds\Queue::isEmpty — Returns whether the queue is empty | PHP 8.3 7558
Ds\Queue::isEmpty (PECL ds >= 1.0.0) Ds\Queue::isEmpty — Returns whether the queue is empty 説明 public function Ds\Queue::isEmpty (): bool Returns whether the queue is empty. パラメータ この関数にはパラメータはありません。 戻り値 Returns t ... rue if the queue is empty, false otherwise. 例 例1 Ds\Queue::isEmpty() example <?php $a = new \Ds\Queue ([ 1 , 2 , 3 ]); $b = new \Ds\Queue (); var_ ... dump ( $a -> isEmpty ()); var_dump ( $b -> isEmpty ()); ?> 上の例の出力は、 たとえば以下のようになります。 bool(false) bool(true) 他のマニュアル ...
https://man.mtool.work/php/8.3/ds-queue.isempty.html
Ds\Set::isEmpty — Returns whether the set is empty | PHP 8.3 7558
Ds\Set::isEmpty (PECL ds >= 1.0.0) Ds\Set::isEmpty — Returns whether the set is empty 説明 public function Ds\Set::isEmpty (): bool Returns whether the set is empty. パラメータ この関数にはパラメータはありません。 戻り値 Returns true if the ... set is empty, false otherwise. 例 例1 Ds\Set::isEmpty() example <?php $a = new \Ds\Set ([ 1 , 2 , 3 ]); $b = new \Ds\Set (); var_dump ( ... $a -> isEmpty ()); var_dump ( $b -> isEmpty ()); ?> 上の例の出力は、 たとえば以下のようになります。 bool(false) bool(true) 他のマニュアル ...
https://man.mtool.work/php/8.3/ds-set.isempty.html
Data Structures | PHP 8.3 7472
Data Structures はじめに Efficient data structures for PHP 7, provided as an alternative to the array . See » this blog post for benchmarks, discussion and frequently asked questions. インストール/設定 要件 インストール手順 例 Ds\Collection ... Ds\Collection::clear — Removes all values Ds\Collection::copy — Returns a shallow copy of the collection Ds\Collection::isEmpty — Returns whether the collection is empty Ds\Collection::toArray — Converts the collection to an array Ds\Hashable — The H ... ector Ds\Vector::get — Returns the value at a given index Ds\Vector::insert — Inserts values at a given index Ds\Vector::isEmpty — Returns whether the vector is empty Ds\Vector::join — Joins all values together as a string Ds\Vector::jsonSerialize — R ... he deque Ds\Deque::get — Returns the value at a given index Ds\Deque::insert — Inserts values at a given index Ds\Deque::isEmpty — Returns whether the deque is empty Ds\Deque::join — Joins all values together as a string Ds\Deque::jsonSerialize — Retu ...
https://man.mtool.work/php/8.3/book.ds.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT