Mantis - Quercus
Viewing Issue Advanced Details
3519 block always 05-16-09 13:24 05-20-09 13:51
koreth  
 
normal  
new 4.0.0  
open  
none    
none  
0003519: Reference not preserved in compiled mode
<?php
function dostuff($args) {
  $ref = &$args['ref'];
  $ref = array('123'=>'abc');
}
function foo() {
  $args = array('ref' => &$arr);
  dostuff($args);
  print_r($arr);
}
foo();

Regular PHP, and Quercus in interpreted mode, prints "Array ( [123] => abc )". Quercus in compiled mode prints nothing. If you assign a value to $arr before the call to dostuff(), that value is still present after the call.

Notes
(0004028)
koreth   
05-20-09 13:51   
This seems to have been fixed in a recent rev of the Pro code; I updated my Pro jar and the problem went away. So please close this bug.