Re: Strange action with =&
| From: | OKi98 | Date: | Tue, 13 Feb 2007 09:28:32 +0000 |
| Subject: | Re: Strange action with =& | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-43071@lists.php.net to get a copy of this message | ||
Peter Beckman wrote:
Because I'm trying to point out a problem with PHP, where setting a reference when the other side is undefined or not set, PHP creates a reference to a previously non-existent array item, just by setting a reference. I don't think that should happen. And? what's wrong with that. The reference can be used in the future - I think thats why it doesnt produce any error message.ie. $array=array("1"=>"a","3"=>"c"); $ref=&$array["2"]; $array["2"]="b"; echo($ref); OKi98