Mantis - Quercus
Viewing Issue Advanced Details
3179 minor always 12-15-08 12:00 12-15-08 13:43
koreth  
ferg  
normal  
closed 4.0.0  
fixed  
none    
none 4.0.0  
0003179: Assignment with comparison operator fails to compile
<?php
function foo() {
  $arr = array();
  if (($foo = count($arr)) < 1) {
    print "yo\n";
  }
}

Fails to compile under the latest Resin Pro:

[11:59:29.981] {resin-38} com.caucho.java.JavaCompileException: .../_lt__php.java:56: operator < cannot be applied to com.caucho.quercus.env.Value,double
[11:59:29.981] {resin-38} if (((v_foo = LongValue.create(ArrayModule.count(env, v_arr, false))) < 1.0)) {

Notes
(0003644)
ferg   
12-15-08 13:43   
php/3aar