Mantis - Quercus
Viewing Issue Advanced Details
3157 minor always 12-12-08 08:51 12-14-08 10:08
koreth  
ferg  
normal  
closed 4.0.0  
fixed  
none    
none 4.0.0  
0003157: unset() of local variable fails to compile
<?php
function foo() {
  $x = 1;
  unset($x);
}

Fails to compile under the latest Resin Pro:

[08:50:40.876] {resin-8} com.caucho.java.JavaCompileException: .../_unset__php.java:55: incompatible types
[08:50:40.876] {resin-8} found : com.caucho.quercus.env.NullValue
[08:50:40.876] {resin-8} required: long
[08:50:40.876] {resin-8} v_x = NullValue.NULL;

Notes
(0003605)
koreth   
12-12-08 08:54   
The real-world use case for this is that one of our error handlers (which gets passed the local-variable context of the function with the error) checks for a couple of local variables to modify its logging behavior.
(0003619)
ferg   
12-14-08 10:08   
php/3229