Mantis - Quercus
Viewing Issue Advanced Details
2935 minor always 09-14-08 12:57 09-15-08 16:06
koreth  
ferg  
normal  
closed 3.2.1  
fixed  
none    
none 3.2.1  
0002935: Java method is passed a Value in interpreted mode and a Var in compiled mode
If I have a Java method that takes a Value argument, then call it like

  MyJavaClass::method($foo);

from PHP, in interpreted mode the argument is an instance of StringValue, DoubleValue, etc. Once the PHP file gets compiled, the argument is an instance of Var instead.

Not a big deal since the Java code can do something like

  if (arg instanceof Var) {
    return method(((Var)arg).toValue());
  }

but it seems to be a recent behavior change; I don't remember seeing this before. Maybe it is perfectly legitimate to get passed a Var for pass-by-reference and the interpreted-mode behavior is incorrect, but it should at least be consistent between the two modes.

Notes
(0003441)
ferg   
09-15-08 16:06   
php/3c81