|
From: <php...@li...> - 2009-07-14 17:31:36
|
Hi, > 1. What is object->value autoconversion? Automatic conversion to a value of some primitive type. Please see section "type juggling" in the php manual. > 2. What proposed hook? Please see http://wiki.php.net/rfc/class_casting_to_scalar > "major interna infrastructure change" from 3.x to 4.x > and didn't see any docs or upgrade guides to inform > me Please see the NEWS entry for version 5.0.0. Quote: "This version is no longer backward compatible with earlier ..." > But what does it *do*? I've looked through the It forces a full round-trip for any java method/function returning a value rather than an object. > Should I just *cast* everything? Only when the Err, no. I have mentioned the cast to explain the problem that php5 has and how this is going to be fixed. The only changes you should be aware of are 1. Undeclared exceptions cannot be caught and 2. No automatic java -> php value conversion. Use java_values(...) to retrieve the value from a java proxy. Please see the news entry for version 5.0.0 for details. I know that these two restrictions are annoying for those who upgrade from earlier versions, but until php doesn't contain the necessary hooks, we must use what's available in php. Regards, Jost Boekemeier 14. Jul 2009 3:02 nachm. schrieb am < php...@li...>: >> So why the sudden infinite loop bug? > > In PHP5 object->value autoconversion only works for stri... 1. What is object->value autoconversion? Do you mean duck typing from $obj to typed values? 2. What proposed hook? 3. We've used this on PHP5 the entire time. >> took me and someone else about 10-12 hours of > > I m sorry for the inconvenience, but we've had... Our use of the bridge has been running perfectly for 2 years and we just haven't had to touch it. I was unaware of the "major internal infrastructure change" from 3.x to 4.x and didn't see any docs or upgrade guides to inform me. >> Simply adding the JAVA_PREFER_VALES=true fixed the > > We will switch it on as soon as possible.... But what does it *do*? I've looked through the Java.inc code but it's just not obvious what this actually does. Would you recommend that I upgrade my code that uses the bridge to work *without* this setting? Does it confer any advantages? Is there a simple guide somewhere that explains what you have to understand about the bridge to make things work in PHP? I have scoured the web site but frankly I just don't see clear instructions on the best practices for using the bridge. Should I just *cast* everything? Only when the expected value is *not* a string? When should you use java_values vs not? I finally see some information regarding this in the Client API docs, but API docs aren't really good for getting started. I'd think it'd be useful to have a small 1-page "client user guide" with a handful of best practices for all of the requisite type-juggling which isn't at all an *expected* thing to need to do. Please understand that these criticisms come from love. The bridge is an amazing piece of software. It's run flawlessly for 2-3 years for us. But every time I use it I find it really confusing to try to get running and I feel that a small "guide" from the developers would save me (and other users) *tons* of time and frustration. I would write it myself for the project but at this point it'd just be terribly wrong! Regards, Alan ------------------------------------------------------------------------------ Enter the BlackBerry... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |