ID:               35995
 User updated by:  jadelucca at comcast dot net
 Reported By:      jadelucca at comcast dot net
 Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: Windows XP
 PHP Version:      5.1.2
 New Comment:

Tony, I think you're a little confused.

This code:

<?php

function prefix(&$text) {
        $text = "Prefix " . $text;
}

prefix($text = "Add prefix to this here, which would do that in older
versions but not this one.");

?>

WORKS in PHP 5.5.1 but doesn't in PHP 5.5.2. One version has to have an
error then. I know because I was doing that sort of thing on this script
I was making and everything was working fine, but then when I upgraded
to 5.5.2 it stopped working. I had to downgrade back to 5.5.1 and it
works again.

ALSO, I just tested the above code and it works in 4.4.1!

Now, can I please get another PHP debugger? This one is a bit confused!


Previous Comments:
------------------------------------------------------------------------

[2006-01-13 17:50:56] [EMAIL PROTECTED]

It doesn't work in 4.4.x either and it has never worked.
There is no bug and I've explained why.

------------------------------------------------------------------------

[2006-01-13 13:15:37] jadelucca at comcast dot net

I don't mean to be a pest, I understand you all have other things to
tend to, but please acknowledge this bug. 

Tony wasn't looking at the right code. The TOP code is the bug, not the
bottom, which is what he commented on.

The TOP code WORKS in PHP 5.1.1 but not PHP 5.1.2. I'm 99.9% sure it
also works in 4.4.1 but I'm not 100%; I don't have access to 4.4.1 now.

------------------------------------------------------------------------

[2006-01-13 13:02:27] jadelucca at comcast dot net

tony

Thank you. I realize this now. BUT let's not give people the wrong
impression, the bug still exists :) I shouldn't have even mentioned the
2nd part because it'll confuse people, confusing them with erroneous
code and an example of the bug.

------------------------------------------------------------------------

[2006-01-13 12:56:17] [EMAIL PROTECTED]

It's not possible to pass expressions by reference.
`$test = "default value"` is an expression.
This is expected behaviour.


------------------------------------------------------------------------

[2006-01-13 12:55:44] jadelucca at comcast dot net

Under reproduce code, that SAME EXACT CODE WORKS on PHP 5.1.1! I just
testing.

The SECOND (Modification code) sends a parse error there too, so maybe
the 2nd example can't be done.

But the bug still lies within PHP 5.1.2! (For those who speed-read
through this and perhaps misundestood me.)

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/35995

-- 
Edit this bug report at http://bugs.php.net/?id=35995&edit=1

Reply via email to