We stopped using __toString as it is unable to handle exceptions - and this makes sense. However, that's IMO not a good reason to completely drop __toString. Especially when debugging, benchmarking and similar you often need a quick way to "dump" an object. In that case you are often not in a mood to figure out whether that specific class prefers create(), dump(), render() or whatever. We should not base our view scripts on __toString - at least unless we do not catch Exceptions in __toString methods, eventually "forwarding" them as triggered error where needed. |
||
---|---|---|
.. | ||
File | ||
Ldap | ||
Livestatus | ||
Nrpe | ||
Dns.php |