Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003082 [Quercus] minor always 11-19-08 11:19 02-10-09 10:03
Reporter ferg View Status public  
Assigned To nam
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.0 Product Version 3.2.1
  Product Build
Summary 0003082: parameter/reference issue with quercus
Description (rep by junphine) http://forum.caucho.com/?q=node/167 [^]

I test this code in Quercus:

echo '';

function do_d(&$d)
{
$d[67]='dddddddddddddd!';
}

$obj=new stdClass();

$brooms=array(
66=>"sweep",
67=>"clean good",
);

$obj->data=array();
$obj->data['tree']=$brooms;

var_dump($obj->data);

do_d($obj->data['tree']); //$obj->data['tree'] will by change to reference.

var_dump($obj->data);
$B=$obj->data;
$B['tree']=array("be changed!"); //so change $B['tree'] will also change $obj->data['tree'].

var_dump($obj->data);

echo '';

it will display:

array(1) {
["tree"]=>
array(2) {
[66]=>
binary(5) "sweep"
[67]=>
binary(10) "clean good"
}
}
array(1) {
["tree"]=>
&array(2) {
[66]=>
binary(5) "sweep"
[67]=>
binary(15) "dddddddddddddd!"
}
}
array(1) {
["tree"]=>
&array(1) {
[0]=>
binary(11) "be changed!"
}
}

when run this code in apache,it display:

array(1) {
["tree"]=>
array(2) {
[66]=>
string(5) "sweep"
[67]=>
string(10) "clean good"
}
}
array(1) {
["tree"]=>
array(2) {
[66]=>
string(5) "sweep"
[67]=>
string(15) "dddddddddddddd!"
}
}
array(1) {
["tree"]=>
array(2) {
[66]=>
string(5) "sweep"
[67]=>
string(15) "dddddddddddddd!"
}
}

I think this is a big different between Quercus and naivie PHP!
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0003820)
nam
02-10-09 10:03

php/04b1
 

- Issue History
Date Modified Username Field Change
11-19-08 11:19 ferg New Issue
11-26-08 11:33 nam Status new => assigned
11-26-08 11:33 nam Assigned To  => nam
02-10-09 10:03 nam Status assigned => closed
02-10-09 10:03 nam Note Added: 0003820
02-10-09 10:03 nam Resolution open => fixed
02-10-09 10:03 nam Fixed in Version  => 4.0.0


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker