Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63128 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97941 invoked from network); 19 Sep 2012 07:40:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Sep 2012 07:40:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=tomas.creemers@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tomas.creemers@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: tomas.creemers@gmail.com X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:45563] helo=mail-pb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 63/53-05716-0D679505 for ; Wed, 19 Sep 2012 03:40:01 -0400 Received: by pbbrp8 with SMTP id rp8so1842863pbb.29 for ; Wed, 19 Sep 2012 00:39:58 -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=9L0/GD0O6emv4LwrRlbtsDxyYxtOG4gq/KQjpGdMlu4=; b=IqwNnPOa9RkAsd+JY7BtC/mgPws1bs9k9mO92fjTJWIi5+/4S/5m8zflp1lbhDGX4I Pdz+sMdGietgmC3Jk/VuFXg8yYXZrX75SndBzbCv9iSE03NbnEY/DLR9DIHuLZwN1IG8 pbZO1hWJYM+F26aUjritLuOd9cK4ikNeHuuac6rd6747p6Ioi9URnGrpgZfKybcColdJ PHhEl5Twn93pwVnRE0G8ZVxwWXGRzcFl5VXpTMsKI9mhntY41jtreE73pa+hXqxm6Ck/ XFLbVRzhb7TKXw+XJanQMC6BINIRJazOJO3Ee/In27UwAJrGHt5DFpK2pJCBBCinuGC3 Mt4w== MIME-Version: 1.0 Received: by 10.68.226.195 with SMTP id ru3mr5086751pbc.149.1348040398123; Wed, 19 Sep 2012 00:39:58 -0700 (PDT) Received: by 10.66.122.98 with HTTP; Wed, 19 Sep 2012 00:39:58 -0700 (PDT) In-Reply-To: References: Date: Wed, 19 Sep 2012 09:39:58 +0200 Message-ID: To: Sebastian Krebs Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Re: RFC: Implementing a core anti-XSS escaping class From: tomas.creemers@gmail.com (Tomas Creemers) On Wed, Sep 19, 2012 at 8:34 AM, Sebastian Krebs wrote: > > > 2012/9/19 Tomas Creemers >> >> Hi all, >> >> >> >> If this is going to be implemented as a class, what is the advantage >> of instantiation for this? Unless I'm missing it, I would propose that >> the functions are made static. >> [snip] >> >> Regards, >> >> Tomas > > > Hi, > > I guess the reason is the same like the one, why you just should avoid > static methods at all. But only one example: Try to extend the class and > then _always_ use the extended one ;) > > Regards, > Sebastian Isn't that what late static binding is for? It enables the use of the extending class (if any) from the base class. I really don't see what class instantiation would add to this design (if it's going to be a class at all). It doesn't have instance-specific state. Regards, Tomas