Wasn't part of the "negotiation" when 4.4 was created that
the behavior would be the same as 4.3 (excluding anything
that happened because of a memory corruption)? (I'm not
counting the notices as behavior.)
I don't see how it can be argued that "$y =& ..." leaving
$y connected to it's old buddie
On Thu, 15 Sep 2005, Todd Ruth wrote:
> Aha! That was the inspiration I needed to get the right
> combination of "&"s. The following bit of code behaves
> differently under 4.3 vs 4.4:
>
> function f(&$a) { return $a; }
> $x = array('a','b','c');
> foreach (array_keys($x) as $k) {
>// I th
I should have said something about a fix. I guess the fix
would be to always unset any variable that is attempting
to be assigned by reference before doing anything else
with the variable. Yes? That would at least fix BC
for the example I gave (and I think Colin's example).
If $y were unset (bas
Aha! That was the inspiration I needed to get the right
combination of "&"s. The following bit of code behaves
differently under 4.3 vs 4.4:
My guess would be that in 4.3 the engine tries to do the
reference even though it may be dangerous. That would
"disconnect" $y from the previous $z[].
Hello again,
Wow, this thread generated more heat than I thought it would, I
basically just wanted to know the reasoning behind making the change to
PHP4, unfortunate I guess for all involved that it went downhill. I
have learned much in the past few days, at any rate.
As mentioned, my code
Hi again from an "ordinary user"!
This thread has some opponents sharpening their knives in the corners.
Hey guys, cool down! It's only ones and zeroes! ;-)
First of all let's find some agreements points:
- I think most of you agree that it was a bigger problem
fixing it with warning in PHP4 t
For the record, I have no idea how the 4.3 -> 4.4 change could trigger
such a bug. I just pointed out that we've hit the symptom Colin
described many times in our company with code (yes, bad code) of
the form:
I've played with many flavors of this user-bug, adding and
subtracting "&"s, but hav