Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63158 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86864 invoked from network); 19 Sep 2012 17:23:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2012 17:23:16 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 64.22.89.134 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 64.22.89.134 oxmail.registrar-servers.com Received: from [64.22.89.134] ([64.22.89.134:57286] helo=oxmail.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/CD-15057-38FF9505 for ; Wed, 19 Sep 2012 13:23:16 -0400 Received: from [192.168.0.200] (5ad4bfa1.bb.sky.com [90.212.191.161]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by oxmail.registrar-servers.com (Postfix) with ESMTPSA id 42E1FF0034; Wed, 19 Sep 2012 13:23:11 -0400 (EDT) Message-ID: <5059FF4F.2010708@ajf.me> Date: Wed, 19 Sep 2012 18:22:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: Michael Shadle CC: Michael Stowe , Lars Strojny , Leigh , "internals@lists.php.net" References: <0960EAA5-17FF-4E0F-9DDE-BB93D13EA02B@gmail.com> <72B22976-6F00-4EF5-88B3-140576CFE4E7@gmail.com> <5059F033.80706@ajf.me> <5059FCCD.3090309@ajf.me> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Implementing a core anti-XSS escaping class From: ajf@ajf.me (Andrew Faulds) 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/