From: Jost B. <jos...@ya...> - 2005-12-21 19:05:19
|
Hi Marc, > I'm using the bridge 3.0.3a, php 4.3.10 and java > 1.5.0_06. > According to the documentation this should work: > $str = new Java("java.lang.String", "hello world"); > echo (string)$str; as of PHP/Java Bridge version 3, php4 and below is no longer supported, although php4 still works as good (or as bad) as in previous releases. The new documentation and the new 3.x features are written and tested against php versions 5.x or 6.x. [in php4] > I have to call > echo $str->toString(); > Is this a bug? Well, that's how the Sam's ext/java extension used to work. The bridge checks if it runs in zend engine 1 or zend engine 2 and sets the protocol options accordingly. Based on the received protocol header the backend selects the appropriate writer, either Sam Ruby's coerce/select or the new code. I think there's no reason to upgrade to php/java bridge version3 if you want to use it with php4. However, the new code allows us to reduce the number of round-trips and to make the implementation more than 3 times faster in future versions. But this can work in php5 and above only. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |