Mantis - Quercus
Viewing Issue Advanced Details
1123 major always 05-17-06 17:21 05-18-06 16:31
koreth  
ferg  
normal  
closed 3.0.20  
fixed  
none    
none 3.0.20  
0001123: Can't call Java method in "return" statement
PHP:

<?php
function foo() {
        $x = new Something();
        print "static text = " . $x->getStaticText() . "
";
        return $x->getStaticText();
}

foo();
?>

Java:

package test;
public class Something {
        public String getStaticText() {
                return "some static text";
        }
}

The first call to getStaticText() succeeds, but the second fails. This is in interpreted mode (compiled mode isn't working for me with the current snapshot so I can't speak for that.) Output looks like:

static text = some static text
/Users/sgrimm/resin/resin/webapps/test/test.php:5: Fatal Error: test.Something: 'getStaticText' is an unknown method.

Notes
(0001151)
ferg   
05-18-06 16:31   
php/0c3{c,d}