Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88154 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37807 invoked from network); 11 Sep 2015 15:27:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Sep 2015 15:27:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.174 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.213.174 mail-ig0-f174.google.com Received: from [209.85.213.174] ([209.85.213.174:33290] helo=mail-ig0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 11/00-37684-AF2F2F55 for ; Fri, 11 Sep 2015 11:27:55 -0400 Received: by igbkq10 with SMTP id kq10so47440243igb.0 for ; Fri, 11 Sep 2015 08:27:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=mP03G4vo6o/JfA1qLRnShXPxlfaGQCrHBLS8/wSM/Nc=; b=iAcUip/7y8QYNqMvho+k4WxpU85Cnws9m2hMz0U5O4Kc9A4TdMfjLr7MlG071+Aiqr /bv9OJIrkYmoBxfDStIc2doaY3CsMjUAGCS7J2mlV7JEiBOC0bk1r/bL9uQ/8TsWXy5n mXD0kQCvol2hbZ4jZZC0BocsUd570/M6BN45eOwwB8NC/qOt86uMrZv5FT4h6BztHWtN t5n+F+MYHPB1UFV/CqYBTQUl6QHeH43KhDsR09aYkDjM9bRDmDDiiVGoJybd3ZP07lIN Y2E5klZzEgJT25FdmH/WmQFoH8H5Kx3G2Xux6sTuqMrNCNnM9V+Z7pBj8r0OLVXZHZwG /Vgg== MIME-Version: 1.0 X-Received: by 10.50.43.170 with SMTP id x10mr4975265igl.12.1441985271743; Fri, 11 Sep 2015 08:27:51 -0700 (PDT) Sender: morrison.levi@gmail.com Received: by 10.79.37.71 with HTTP; Fri, 11 Sep 2015 08:27:51 -0700 (PDT) In-Reply-To: <55F20E72.6050309@dasprids.de> References: <55E4B9AA.9060906@dasprids.de> <55F20B8D.3010805@dennis.birkholz.biz> <55F20E72.6050309@dasprids.de> Date: Fri, 11 Sep 2015 09:27:51 -0600 X-Google-Sender-Auth: 1ZuSo_vwKeueo_qK_ICLXtNjPmM Message-ID: To: "Ben Scholzen 'DASPRiD'" Cc: Dennis Birkholz , internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Generic classes and methods RFC From: levim@php.net (Levi Morrison) On Thu, Sep 10, 2015 at 5:12 PM, Ben Scholzen 'DASPRiD' wrote: > Hi Dennis, > > thanks for your feedback, see my answers below: > >> 1. static methods: >> >> class Foo { >> public static function test() { >> } >> } >> >> how can I call the method: >> a) Foo::test() >> or >> b) Foo::test() >> >> in case b), would the generic methods not be a duplication? > > > Case a) is correct here. A static method is not in the context of an > instance, so it doesn't know about the class boxing by itself. I think b would be correct. Can you explain this rationale a bit more?