From:             mkimsal at conduit-it dot com
Operating system: Linux
PHP version:      5.0.3
PHP Bug Type:     Feature/Change Request
Bug description:  new array_merge behavior is inconsistent with other functions 
and PHP's spirit.

Description:
------------
This creates a need to define variables before being used  
which is opposite of PHP's original behavior and spirit.   
This strange array_merge behavior is one step closer to  
making PHP a strongly typed language if the function  
behaves differently depending on whether or not aruments  
are defined and empty or not defined at all.  

Reproduce code:
---------------
$array2 = array('a');

$empty_var = array_merge($array1,$array2);



Expected result:
----------------
$empty_var should be an array with the same contents as 
array2. 

Actual result:
--------------
$empty_var contains no data at all.  This is different 
from PHP4 behavior with no benefits. 

-- 
Edit bug report at http://bugs.php.net/?id=31643&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31643&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31643&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31643&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31643&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31643&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31643&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31643&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31643&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31643&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31643&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31643&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31643&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31643&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31643&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31643&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31643&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31643&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31643&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31643&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31643&r=mysqlcfg

Reply via email to