Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63154 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80899 invoked from network); 19 Sep 2012 17:12:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2012 17:12:34 -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:47449] helo=oxmail.registrar-servers.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/7C-15057-10DF9505 for ; Wed, 19 Sep 2012 13:12:34 -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 ADA92F002E; Wed, 19 Sep 2012 13:12:28 -0400 (EDT) Message-ID: <5059FCCD.3090309@ajf.me> Date: Wed, 19 Sep 2012 18:11:41 +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> 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 17:57, Michael Shadle wrote: > If you want to play with OO all day, then use Java. PHP was built on > procedural, and now all you OO fanboys are going nuts with it. :) On a > short-lived web request I see no reason to complicate and obfuscate > the code with OO. Please explain in detail how object-oriented code obfuscates, complicates, murders baby kittens, etc. > This is becoming religious now, and a fight I will probably lose, but > think about PHP core, it does not need to actually start having "OO > only" stuff, especially when we're talking about one-line functions. This is becoming religious now, and a fight I will probably lose, but think about PHP core, it does not need to actually start having "Procedural only" stuff, especially when we're talking about one-line functions. > 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. > You can always build something from a basic simple foundation, which > is how PHP's OO is built anyway. Don't complicate things because of > personal preference. There is no reason it cannot stay a simple > function call or two. Wrap that in as many classes as you wish on your > own time. :) What's complex about a method call? -- Andrew Faulds http://ajf.me/