Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63156 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84048 invoked from network); 19 Sep 2012 17:19:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2012 17:19:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=mike503@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=mike503@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.42 as permitted sender) X-PHP-List-Original-Sender: mike503@gmail.com X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:45561] helo=mail-pb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/2D-15057-29EF9505 for ; Wed, 19 Sep 2012 13:19:14 -0400 Received: by pbbrp8 with SMTP id rp8so2948507pbb.29 for ; Wed, 19 Sep 2012 10:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xSzDxqlJ75XyVUZp+sUA3MZCOQmXowvjNl0SXJE34Ko=; b=DkUzF1DSdigHtqDxnk2ypMUmCyQamEJ1rie9CkfBSctS0PTDQy2s6MwudJK7FDOtHE aVzSjbergWvqWmzIUCTG2bZiQq5juHwnnXWrA3CWqIgJY9k48Eny+IFF4Ymzv1bKsv4a giGqhr03+uuj35y8ayAosl+2IVrFvawGyRlb5D8hVsR4Oo+k6u0vzOiur2yAMNhKjW5L TmgFgUbR/j3OF3ZGCgHwzKZLXdvmCFSx9s4MTw/NJpEzbYui2w+YoX6LBpRSVpCEvZEd HbnwHoNY8yisZsAKrl5NQCnKYa4msikxan8JaYufSjU/1iz6w42DkNOsHIQkLHRkgUv3 eRbQ== MIME-Version: 1.0 Received: by 10.66.79.36 with SMTP id g4mr8346295pax.67.1348075151724; Wed, 19 Sep 2012 10:19:11 -0700 (PDT) Received: by 10.68.12.167 with HTTP; Wed, 19 Sep 2012 10:19:11 -0700 (PDT) In-Reply-To: <5059FCCD.3090309@ajf.me> References: <0960EAA5-17FF-4E0F-9DDE-BB93D13EA02B@gmail.com> <72B22976-6F00-4EF5-88B3-140576CFE4E7@gmail.com> <5059F033.80706@ajf.me> <5059FCCD.3090309@ajf.me> Date: Wed, 19 Sep 2012 10:19:11 -0700 Message-ID: To: Andrew Faulds Cc: Michael Stowe , Lars Strojny , Leigh , "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] RFC: Implementing a core anti-XSS escaping class From: mike503@gmail.com (Michael Shadle) On Wed, Sep 19, 2012 at 10:11 AM, Andrew Faulds 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.