Re: RFC: Implementing a core anti-XSS escaping class
| From: | Andrew Faulds | Date: | Wed, 19 Sep 2012 17:22:23 +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 15 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-63158@lists.php.net to get a copy of this message | ||
On 19/09/12 18:19, Michael Shadle wrote:
Because a simple str_replace one line will become 6-10 lines of OO code very easily? Does it?Let's use an example from Python, which actually has strin methods. And then stop this argument that isn't related to the topic. PHP:
str_replace('yak', 'y', 'z')
Python:
'yak'.replace('y', 'z')
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. Again, "all the OOP code is a waste of time" doesn't really add anything to this discussion. Arguing against this being OOP, which I think is useful and requires, at most, one extra line ($x = new Escaper), is silly.-- Andrew Faulds http://ajf.me/