Re: Lexical scoping
| From: | Sebastian Krebs | Date: | Wed, 29 Jan 2014 11:11:03 +0000 |
| Subject: | Re: Lexical scoping | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-71722@lists.php.net to get a copy of this message | ||
2014-01-28 Andrea Faulds <ajf@ajf.me>
>
>
> On 28/01/14 12:31, Sebastian Krebs wrote:
>
>> foreach ($array as &$a) {
>> $a = 3;
>> }
>> $a = null; // $a not a reference anymore. Problem solved :)
>>
>
> You just changed the last element of the array to null.
>
> See why I proposed this? ;)
I already fixed this... Read the other messages as well:
http://codepad.viper-7.com/lOx1XL
>
> --
> Andrea Faulds
> http://ajf.me/
>
--
github.com/KingCrunch