Mantis - Quercus
Viewing Issue Advanced Details
3163 trivial always 12-12-08 12:20 12-14-08 11:19
koreth  
ferg  
normal  
closed 4.0.0  
fixed  
none    
none 4.0.0  
0003163: Multiple expressions in "for" cause compile failure
<?php
function foo() {
  for ($y=30; printf("\n"), $C = $y*0.1 - 1.5, $y--;);
}

This runs in interpreted mode. It fails to compile, though:

[12:18:24.598] {resin-26} com.caucho.java.JavaCompileException: .../_for_22dcomma__php.java:55: ')' expected
[12:18:24.598] {resin-26} env.comma(env.comma(LongValue.create(com.caucho.quercus.lib.string.StringModule.printf(env, qv__1, Value.NULL_ARGS)), new DoubleValue(v_C)v_C = ((v_y * 0.1) - 1.5))), LongValue.create((v_y--))).toBoolean();
[12:18:24.598] {resin-26} ^
[12:18:24.598] {resin-26} .../_for_22dcomma__php.java:55: ';' expected
[12:18:24.598] {resin-26} env.comma(env.comma(LongValue.create(com.caucho.quercus.lib.string.StringModule.printf(env, qv__1, Value.NULL_ARGS)), new DoubleValue(v_C)v_C = ((v_y * 0.1) - 1.5))), LongValue.create((v_y--))).toBoolean();
[12:18:24.598] {resin-26} ^
[12:18:24.598] {resin-26} .../_for_22dcomma__php.java:55: illegal start of expression
[12:18:24.598] {resin-26} env.comma(env.comma(LongValue.create(com.caucho.quercus.lib.string.StringModule.printf(env, qv__1, Value.NULL_ARGS)), new DoubleValue(v_C)v_C = ((v_y * 0.1) - 1.5))), LongValue.create((v_y--))).toBoolean();
[12:18:24.598] {resin-26} ^
[12:18:24.598] {resin-26} .../_for_22dcomma__php.java:55: illegal start of expression
[12:18:24.598] {resin-26} env.comma(env.comma(LongValue.create(com.caucho.quercus.lib.string.StringModule.printf(env, qv__1, Value.NULL_ARGS)), new DoubleValue(v_C)v_C = ((v_y * 0.1) - 1.5))), LongValue.create((v_y--))).toBoolean();
[12:18:24.598] {resin-26} ^
[12:18:24.598] {resin-26} .../_for_22dcomma__php.java:55: ';' expected
[12:18:24.598] {resin-26} env.comma(env.comma(LongValue.create(com.caucho.quercus.lib.string.StringModule.printf(env, qv__1, Value.NULL_ARGS)), new DoubleValue(v_C)v_C = ((v_y * 0.1) - 1.5))), LongValue.create((v_y--))).toBoolean();
[12:18:24.598] {resin-26} ^
[12:18:24.598] {resin-26} .../_for_22dcomma__php.java:55: ';' expected
[12:18:24.598] {resin-26} env.comma(env.comma(LongValue.create(com.caucho.quercus.lib.string.StringModule.printf(env, qv__1, Value.NULL_ARGS)), new DoubleValue(v_C)v_C = ((v_y * 0.1) - 1.5))), LongValue.create((v_y--))).toBoolean();
[12:18:24.598] {resin-26} ^
[12:18:24.598] {resin-26} .../_for_22dcomma__php.java:56: illegal start of expression
[12:18:24.598] {resin-26} ) {
[12:18:24.598] {resin-26} ^

Notes
(0003621)
ferg   
12-14-08 11:19   
php/3628