note 54273 deleted from function.array-merge by nlopess

From: Date: Wed, 29 Jun 2005 12:15:12 +0000
Subject: note 54273 deleted from function.array-merge by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-91128@lists.php.net to get a copy of this message
Note Submitter: fa [at] php [dot] net ---- The behaviour changed a bit from PHP4 to PHP5 it seems. If you take this example code: <?php $a = array("one"); $b = array("two"); $c = false; var_dump(array_merge($a,$b)); var_dump(array_merge($a,$c)); ?> it will produce this on PHP4 array(2) { [0]=> string(3) "one" [1]=> string(3) "two" } array(2) { [0]=> string(3) "one" [1]=> bool(false) } and that on PHP5 array(2) { [0]=> string(3) "one" [1]=> string(3) "two" } Warning: array_merge() [function.array-merge]: Argument #2 is not an array in D:\Apps\xampp\htdocs\array_merge.php on line 8

« previous php.notes (#91128) next »