ID:               40137
 Comment by:       judas dot iscariote at gmail dot com
 Reported By:      kolypto at mail dot ru
 Status:           Open
 Bug Type:         Variables related
 Operating System: WinXP
 PHP Version:      5.2.0
 New Comment:

sigh. lets see..

function modify(&$str1)
{

print "\n".'In function:'.$str1;
$str1='MOD';

}

// the variable $a is locally **defined** with value "IN"
modify($a='IN'); //this prints 'In function: IN' (as expected)

print "\n".$a; // $a is **already defined** as 'IN', hence it SHOULD
print 'IN' **not** MOD

wth are you talking about ?? works as expected.


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

[2007-01-15 22:23:05] kolypto at mail dot ru

Recent research: in 5.0.4 this code works as expected:

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

[2007-01-15 21:28:24] kolypto at mail dot ru

I insist.
The parser does not give the expected result in the output.
http://www.php.net/support.php has nothing common with bug reports,
this is just a help center

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

[2007-01-15 20:36:10] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.



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

[2007-01-15 20:27:31] kolypto at mail dot ru

ADD: php 5.2.0 was downloaded from php.net as windows binary

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

[2007-01-15 20:11:21] kolypto at mail dot ru

Description:
------------
I've noticed that the construction doesn't work fine with php 5.1.6 and
5.2.0
php4 is okay with this

The function reciaves value 'IN', prints it, and changes it to 'MOD'...
but only in php4 =)
Spent hours catching this

Reproduce code:
---------------
function modify(&$str1)
{
print "\n".'In function:'.$str1;
$str1='MOD';
}

modify($a='IN');
print "\n".$a;

Expected result:
----------------
In function:IN
MOD


Actual result:
--------------
In function:IN
IN


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


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

Reply via email to