#35995 [Opn->Asn]: Problems defining vars in arguments

From: Date: Sat, 14 Jan 2006 18:59:59 +0000
Subject: #35995 [Opn->Asn]: Problems defining vars in arguments
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-91917@lists.php.net to get a copy of this message
ID: 35995 Updated by: derick@php.net Reported By: jadelucca at comcast dot net -Status: Open +Status: Assigned Bug Type: Scripting Engine problem Operating System: Windows XP PHP Version: 5.1.2 -Assigned To: +Assigned To: dmitry New Comment: It's not a bug in 5.1.2, but in earlier versions. PHP 4.4 still inhbits this bug though, in the form that it doesn't give an E_STRICT error. Dmitry, can you have a look at that? Previous Comments: ------------------------------------------------------------------------ [2006-01-14 19:38:54] jadelucca at comcast dot net Tony and Sniper, If this is not a bug, could you then tell me why it works in PHP 5.1.1 and PHP 4.4.1 but not in 5.1.2? Was there a bug in those two versions then? I still don't think you're seeing what I'm trying to say... ------------------------------------------------------------------------ [2006-01-14 15:09:36] sniper@php.net It was already acknowledged that this is not a bug. Twice. ------------------------------------------------------------------------ [2006-01-13 23:48:22] jadelucca at comcast dot net Modified to open. The bug still has not be acknowledged. ------------------------------------------------------------------------ [2006-01-13 20:36:42] jadelucca at comcast dot net Hah, I meant 5.1.x in my above post. Once again, the code works in all but 5.1.2 and results "Prefix add prefix"... There really should be an edit post here so I don't need to keep posting new messages :( ------------------------------------------------------------------------ [2006-01-13 20:29:15] jadelucca at comcast dot net 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! ------------------------------------------------------------------------ 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

« previous php.bugs (#91917) next »