Mantis - Quercus
Viewing Issue Advanced Details
3258 major always 01-14-09 18:39 01-15-09 10:09
koreth  
nam  
normal  
closed 4.0.0  
fixed  
none    
none 4.0.0  
0003258: Object __toString is not being called when object is passed to Java module function
<?php
class Foo {
  public $var = 'abc';
  public function __toString() {
    return $this->var;
  }
}
$x = new Foo;
error_log($x);

This should log "abc" but it logs "ObjectExtValue@921428820[Foo]" instead. This also affects Java methods that are in PHP extension classes (i.e., listed in WEB-INF/classes/META-INF/services/com.caucho.quercus.QuercusModule rather than imported with an "import" statement.)

Notes
(0003734)
nam   
01-15-09 10:09   
php/0c4n
php/3c4n