note 123566 deleted from function.array-merge by cmb

From: Date: Wed, 30 Jan 2019 15:39:01 +0000
Subject: note 123566 deleted from function.array-merge by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-210143@lists.php.net to get a copy of this message
Note Submitter: chris at 3rcinteractive dot com ---- Something I ran across that may be useful to some. If one of the parameters in the merge is NOT an array you won't receive a notice that type is incorrect. Instead the merged array will nullify. <?php $first = 'foo'; $second = ['bar', 'again']; $merged = array_merge($first, $second); var_dump($merged); // will display null ?>

« previous php.notes (#210143) next »