note 54562 deleted from function.array-merge by betz
| From: | betz@php.net | Date: | Fri, 08 Jul 2005 07:57:30 +0000 |
| Subject: | note 54562 deleted from function.array-merge by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-91641@lists.php.net to get a copy of this message | ||
Note Submitter: fa at codeschmie dot de
Reason: useless
----
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