From: <php...@li...> - 2007-03-22 18:55:52
|
Hi, > Output on the web page: > [o(String)JavaClass] I think you're right, it seems foolish to require an explicit conversion from java.lang.String to string. Please add the following code to the php.java.bridge.JavaBridge.java: public String ObjectToString(String ob) { return (String)castToString(ob); } After that all java.lang.String objects are displayed as a string value, even though they are still string objects: $s = new Java("java.lang.String", "hello world"); echo $s; echo "\n"; echo $s->substring(0,5); => hello world => hello I have uploaded 4.0.3 for testing, it already contains this code. Thank you very much for the bug report. > I've tried to cast it like so That worked with the C based extension, but object->value casts do not work on PHP level. That's a shortcoming in the php engine, imho. Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |