note 54762 added to function.array-merge
| From: | ntpt at centrum dot cz | Date: | Thu, 14 Jul 2005 13:44:00 +0000 |
| Subject: | note 54762 added to function.array-merge | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-91965@lists.php.net to get a copy of this message | ||
Old behavior of array_merge can be restored by simple variable type casting like this
array_merge((array)$foo,(array)$bar);
works good in php 5.1.0 Beta 1, not tested in other versions
seems that empty or not set variables are casted to empty arrays
----
Manual Page -- http://www.php.net/manual/en/function.array-merge.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54762
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54762&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54762&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54762&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54762&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54762&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54762&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54762&report=yes
Search -- http://master.php.net/manage/user-notes.php