Re: array_merge php4 cvs

From: Date: Sat, 08 Jan 2000 03:18:31 +0000
Subject: Re: array_merge php4 cvs
References: 1 2 3 4  Groups: php.dev 
Request: Send a blank email to php-dev+get-14377@lists.php.net to get a copy of this message
At 12:30 AM 1/8/00 +0100, Stefano Bagnara wrote: >suppose i have a global GET variable called gg with value 2; > >$a = array(); >$a = array_merge($a,$GLOBALS['HTTP_GET_VARS']); >print($GLOBALS['gg']); >$a['gg'] = 3; >print($GLOBALS['gg']); > >the first print return 2.. the second return 3.. instead of 2. I don't see any problem here. Every variable in $HTTP_GET_VARS is a reference so it gets merged into the destination array as a reference. -Andrei

« previous php.dev (#14377) next »