The problem is that user-land overloading can't be supported. C extensions might be able to be supported but I don't think it's a good idea to start hacking this into PHP. It wouldn't end at the comparison operator but people would want it to work everywhere.
I don't want user overloading - I've been consistently against that for objects of all types. I want it internally cause its important to be able to overload all operations for something like SimpleXML to properly work. The same applies to ext/mono (has the same issues as java, but even more due to field and property distinctions.)
My concern lies more with functions like utf8_encode() not properly getting the contents of the XML string - but I haven't looked into it too much - I'll try and get some hacking done on the cruise.
The way to do it today is to do a cast to (string) although I admit it's not a beautiful solution.
Right - what I don't understand is that why doesn't convert_to_string_ex() handle this?
Because it's much more complicated than just changing convert_to_string_ex(). You have to modify all comparison operators to support this and god knows what else.
Andi
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php