Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86102 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1614 invoked from network); 30 Apr 2015 23:43:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Apr 2015 23:43:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.215.47 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.215.47 mail-la0-f47.google.com Received: from [209.85.215.47] ([209.85.215.47:34359] helo=mail-la0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F7/80-30948-71EB2455 for ; Thu, 30 Apr 2015 19:43:20 -0400 Received: by laat2 with SMTP id t2so55722819laa.1 for ; Thu, 30 Apr 2015 16:43:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=FcrftxYvwkqOVA4YtEINh+Y+O82Z60nhMrTxAKxAo/g=; b=a+H7isKgpbRnP7VPDu7R4prl4+ByUjWx173yXkJpyRuoyXXvN0d1IOEMcJOv0YPWBe Ct2O5nuveOMmcg1Wom2Nhl2/MwA1+gTjDmh6IcnXgAlohvW8Afdt025jWY7MUItiyY1G PQNb6K1ZNu5wG+77UB1nQXIOgfDG3A31e8Cq3Ganfkzf1SLVlUE4rdI5tpsnuiVXtaoo 4ioO4zYQcb6/eCE6K0+nSpiAtVGfG14XF0bi00uiJnPp1UZhVlkrHCAmuTH53QJPQcuS i9F5SzOIfaA0gX8NOh3Tu7cmsQQdcbAr0H6oZ2INdGLCiaMNgldxkT7fWuZlAUim/ive oyIQ== X-Gm-Message-State: ALoCoQm0GTQ97s7Pi0vGON+zzSPSLjOQQFh49c28gnDmcO+7U6kA5uEfgbHKObu4YsSRR5P18VK4 MIME-Version: 1.0 X-Received: by 10.112.126.162 with SMTP id mz2mr5870505lbb.97.1430437396316; Thu, 30 Apr 2015 16:43:16 -0700 (PDT) Sender: php@golemon.com Received: by 10.112.11.134 with HTTP; Thu, 30 Apr 2015 16:43:16 -0700 (PDT) X-Originating-IP: [2620:10d:c082:1055:22c9:d0ff:fe87:295b] In-Reply-To: References: Date: Thu, 30 Apr 2015 16:43:16 -0700 X-Google-Sender-Auth: XRi3McqwRj2mS2O17i7M0T_OpNQ Message-ID: To: "S.A.N" Cc: Anthony Ferrara , internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Add support $object::class From: pollita@php.net (Sara Golemon) On Mon, Apr 27, 2015 at 10:28 AM, S.A.N wrote: >> Why not? >> > > 1. get_class($object) - looks bad and long > It's a function call. A pretty much self-declarative one at that. What is "bad" about it? For that matter, what's "long" about it? It's pretty short as PHP function calls go. > 2. Illogically - Bar::class valid syntax, $object::class invalid syntax. > I'll grant you the consistency argument. I'm all for consistency, but that's the ONLY valid reason you've stated. > 3. Function call get_class($object) is slower > Not so much so that you'd notice. Fix the performance issues which actually make an impact first. When you've done that, THEN come back. (Hint: You haven't) -Sara