|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-03-21 10:13 UTC] goetas at lignano dot it
Description:
------------
i've found this array reference problem.
Test script:
---------------
function remTest($array){
unset($array['a'][0]);
}
$a = array(
'a'=> array(0=>'test')
);
$b = &$a['a'];
print_r($a);
remTest($a);
print_r($a);
Expected result:
----------------
Array
(
[a] => Array
(
[0] => test
)
)
Array
(
[a] => Array
(
[0] => test
)
)
Actual result:
--------------
Array
(
[a] => Array
(
[0] => test
)
)
Array
(
[a] => Array
(
)
)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 21:00:01 2025 UTC |
i've also tested modifying the "remTest" function... function remTest($array){ unset($array['a']); } with this function the code works correctly... really strange...