Re: RFC: Implementing a core anti-XSS escaping class
| From: | Michael Shadle | Date: | Wed, 19 Sep 2012 17:19:11 +0000 |
| Subject: | Re: RFC: Implementing a core anti-XSS escaping class | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-63156@lists.php.net to get a copy of this message | ||
On Wed, Sep 19, 2012 at 10:11 AM, Andrew Faulds <ajf@ajf.me> wrote:
> Please explain in detail how object-oriented code obfuscates, complicates,
> murders baby kittens, etc.
Because a simple str_replace one line will become 6-10 lines of OO
code very easily?
Maybe you write "amazing" OO code, but the stuff I see is usually
needless waste or reinventing core functionality and not adding any
additional value.
>> Next you'll start saying "why can't I do $string = new String();
>> $string->input($input); $string->replace($output);" or something,
>> instead of str_replace.
>
> Actually, I have. As an advocate of APIs with consistent argument order that
> newbies like me can learn more easily, I *have*, in fact, proposed that.
Your argument regarding consistent argument order is noted and agreed.
The needle/haystack/etc has always been an annoyance. But that's about
it.