note 11821 deleted from language.references.unset by cece
| From: | cece@php.net | Date: | Mon, 18 Aug 2003 11:05:52 +0000 |
| Subject: | note 11821 deleted from language.references.unset by cece | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-54575@lists.php.net to get a copy of this message | ||
Note Submitter: aulbach@unter.franken.de
----
There are some other side effects:
<?
function test(&$bla) {
unset($bla);
$bla="huhu";
}
$bla="HIHI";
test($bla);
echo $bla;
?>
This will return "HIHI" - as (hopefuly) expected...
BUT (!)
<?
function test(&$bla) {
unset($bla['hugo']);
$bla['hugo']=3;
}
$bla=Array(
'hugo'=>1,
'huba'=>2
);
test($bla);
print_r($bla);
?>
Will return
Array ( [huba] => 2 [hugo] => 3 )
... which is in my eyes very strange.
I made a bug rebort (# 8972). Currently we discuss, if it is a bug or not. :-)