note 124349 deleted from function.is-array by cmb

From: Date: Mon, 28 Oct 2019 17:27:32 +0000
Subject: note 124349 deleted from function.is-array by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212867@lists.php.net to get a copy of this message
Note Submitter: MikeF ---- While this is implied in the definition I have verified (PHP 5.5.38, 7.1.32, 7.2.23 and 7.3.10) that: is_array(null) == false So there is no need for this: if (isset($arr) && is_array($arr)) { /* … */ } The same can be accomplished with: if (is_array($arr)) { /* … */ } The value null is often a special case so I think this should be included in the documentation.

« previous php.notes (#212867) next »