On 10/18/07, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > > While looking at bug 42780: http://bugs.php.net/bug.php?id=42780 > > The only way not to lose precision is to explicitly cast the object to > > float or string, which just doesn't seem right to me. > > I'm not sure how this can be fixed - there should be some type used and > many objects won't provide convertor to float... Anyway, it's probably > not the best idea to rely on default conversion in this context - better > to specify it.
In this case, the proper solution is to force SimpleXML to cast values to strings, because, after all, XML has nothing but strings. Then engine would be able to cast the value further to float (as the last example in bug shows) -- Alexey Zakhlestin http://blog.milkfarmsoft.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php