From: Jost B. <jos...@ya...> - 2005-09-23 12:01:40
|
Hi, > now I understand why didn't work. When I do "$i=1" I > make the $i a long. So, > the only way that we can handle Integer is with the > java constructor. I think it is a mistake to rely on auto-conversions, especially if the function parameter doesn't have any type information (e.g. the type is java.lang.Object). Under some circumstances PHP changes the number type from exact to inexact. If your hash table contains a Long with the value 1 and you ask for $i (when $i is a float), this will not work either. Depending on whether the proposed "php ints are java longs" flag is set or not, you will ask for a java.lang.Long object with the value 1 or for a java.lang.Integer object with the value 1. Regards, Jost Boekemeier ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |