|
From: <php...@li...> - 2008-10-18 12:44:38
|
Hi again,
> However, I was wondering whether it is possible to get back
> objects without having to alter the PHP code.
it is certainly possible to "magically" wrap and unwrap PHP objects.
I understand that this may become a portability issue, provided that there will be more than PHP/Java JSR 223 binding which wraps/unwraps PHP objects automatically. But since such an alternative binding does not exist yet, we will keep java_closure() and java_values().
Any good PHP/Java binding will not wrap/unwrap PHP objects automatically, because this will become a major performance issue, even for a non-remoting script engine. Furthermore with auto-unwrapping enabled the following code will fail:
$buf = new java("java.util.StringBuffer", "1234567890")
$str = $buf->toString()
$str = $str->substring(1,5) will fail because str is a PHP
$str = $str->substring(2) string, not a Java string anymore
Regards,
Jost Boekemeier
__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com
|