ID: 33591 Updated by: [EMAIL PROTECTED] Reported By: nobody at somewhere dot de -Status: Open +Status: Feedback Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 4.3.11 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Previous Comments: ------------------------------------------------------------------------ [2005-07-06 16:48:50] nobody at somewhere dot de Description: ------------ I don't know about any php-Interna Somehow a PHP-Variable seems to have a Flag that means "Is a Reference". This Flag is not resetted under the conditions I show in the code below. Cheers! Reproduce code: --------------- #--- global $ar; $ar= array("[element of ar]"); var_dump($ar); $ok= f(); $ok[0]= "[i DIDN'T set ar!]"; var_dump($ar); $bug= & f(); $bug= f(); # bug! doesn't reset reference-flag $bug[0]= "[i DIDN'T set ar!]"; var_dump($ar); function & f() { global $ar; return $ar; } exit; #--- Expected result: ---------------- array(1) { [0]=> string(15) "[element of ar]" } array(1) { [0]=> string(15) "[element of ar]" } array(1) { [0]=> string(15) "[element of ar]" } Actual result: -------------- array(1) { [0]=> string(15) "[element of ar]" } array(1) { [0]=> string(15) "[element of ar]" } array(1) { [0]=> string(18) "[i DIDN'T set ar!]" } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33591&edit=1
