From: <php...@li...> - 2007-05-26 10:41:57
|
Hi Jonathan, the bug described below has been fixed in PHP version 5.2.0 and above. (I am not sure, but I think PHP 5.1.6 contains the same fix). Please use this version instead. > These echoes, however, do not: > > $string = new Java('java.lang.String', 'abc'); > echo "This is my $string" . "\n"; > echo "This is my " . $string . "\n"; > echo $string " is my string" . "\n"; > > The result I see is: > > This is my Object id #30 > This is my Object id #30 > Object id #30 is my string Yes, that was a known bug in the PHP engine. It appeared in all PHP 5 versions from 5.0.0 to 5.1.5. > The result is similar with other object types. > Echoing just a boolean > object gives [[o:Boolean]:"true"], but concatenating > it with a string > gives "Object id #1 is my boolean". It should display: [[o:Boolean]:"true"] is my boolean. If you don't want to upgrade to PHP 5.2.x or at least 5.1.6, please use the "java.so" or "php_java.dll" from the php-java-bridge-legacy download. It contains a piece of C code which works around this problem. Regards, Jost Boekemeier __________________________________ Yahoo! Clever - Der einfachste Weg, Fragen zu stellen und Wissenswertes mit Anderen zu teilen. www.yahoo.de/clever |