toString() in SimpleXML?

From: Date: Mon, 14 Feb 2005 12:23:44 +0000
Subject: toString() in SimpleXML?
Groups: php.internals 
Request: Send a blank email to internals+get-15016@lists.php.net to get a copy of this message
Hi, I have a feature request. Maybe it would be a good idea to have a toString() or perhaps nodeValue() method in SimpleXML's SimpleXMLElement class? It might make it more obvious that the element is still a SimpleXMLElement object when you want to actually use it (when you print it, the value automagically casts to a string internally, so users might think that it will be casted to a string when you directly access it without a specified property/method, which is not the case). I know that the docs say that you should cast it to a string when you want to do a comparison, but apart from that just being an example, maybe my suggestion is a more obvious one to notice? regards, Leendert

« previous php.internals (#15016) next »