Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.c
| From: | Stanislav Malyshev | Date: | Mon, 01 Dec 2003 15:56:57 +0000 |
| Subject: | Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.c | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-5888@lists.php.net to get a copy of this message | ||
AMT>> I *don't* think it's realisitic to make a person explictly cast
AMT>> $item->title to a string here. That's not SimpleXML, that's
If it's not a string - definitely it does.
AMT>> ConfusingXML, particularly when this works perfectly fine:
If you find it confusing - change API of SimpleXML so that it would make
$item->title a string. If you put object in something, why don't you
expect it be an object? Why it should instantly become string?
AMT>> ensure their HTML is valid and to prevent XSS attacks. A non-safe
AMT>> lazy default is asking for trouble.
So is complicated default behaviour good or is it bad? I consider it be
bad - including auto-converting objects to strings. Except, probably, for
explicit (string) conversion.
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.109