ID: 11541
Updated by: andre
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: Feature/Change Request
Operating system:
PHP Version: 4.0.4pl1
Assigned To:
Comments:
no bug, closing
ps. this is PHP there won't be local variables like the ones you proposed in the near
future I guess
Previous Comments:
---------------------------------------------------------------------------
[2001-06-18 14:29:54] [EMAIL PROTECTED]
well, maybe this behaviour is not so weird as I tought...
the problem I had, was that the line taking the reference
and the foreach-statement were far apart, and I'd really
like to have localized variables in the foreach, like
foreach($arr as (my $val))...
---------------------------------------------------------------------------
[2001-06-18 14:20:23] [EMAIL PROTECTED]
<?php
echo "<small><pre>";
/* for some reason the following code magically kills
an array value, or better, overwrites it with another one.
might be related to bug #6417 */
$arr = array('a','b');
$ref =& $arr[0];
print_r($arr);
/* gives: Array ( [0] => a [1] => b ) */
foreach($arr as $ref);
print_r($arr);
/* gives: Array ( [0] => b [1] => b ) */
?>
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11541&edit=2
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]