Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115254 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 61257 invoked from network); 1 Jul 2021 13:40:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Jul 2021 13:40:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4A1C71804C4 for ; Thu, 1 Jul 2021 07:00:52 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 1 Jul 2021 07:00:51 -0700 (PDT) Received: by mail-ej1-f46.google.com with SMTP id gt10so9186154ejc.5 for ; Thu, 01 Jul 2021 07:00:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q2OmylvYrVeKpah8jfNMmjpXPVtLg+dj36VWDdOmflE=; b=R56ZiIQHoiw0ph09MvKeeWHXnHJuZKRNXGqFhYiK6d+ReRHAJ6G4F6+mUMimIDA/4w WvI+FqcB0Qp339juL8gFisjuWGDIMrOp3z0CdrCWMeFPsMe6igh3e6+0BF741an9AE47 7CckwFoNe74mmZYmzi2NauyzfZtyX6ym8dNQjXFeLSy+HtzWZqAtI2S6oqDmaE5nV3P8 /hyH50Wj1UNfL9UFSZWCx7DtxCUWHS1EyWk5jcLLMum2fWBg7VM8vzkBMj3mtyUhVDuR lc59Ckq3HyzoEgf8IW/QkjZcvdotCMTuF4iqwrN9zuPnv3Up+7LwoE7ke8Qsjeyr1aA4 jCBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q2OmylvYrVeKpah8jfNMmjpXPVtLg+dj36VWDdOmflE=; b=L/3haZ8+/d0lDdoA03aae/n8ikNgpjY8N15Z9P6cAFePrB2aNzvmDT/cET+TsFfkS5 ryAFeJzwGeKvSsVOxPEjj8T+BMGhIac6U74qCM0EA8y8xUa31Qg3Iz0CDUz7VJb7lxC+ l6nIDbO7ZTDhWALQlDkE+evgm4/andrqTnOvhTd9wFcu/y6iyKbsLQs0KsIm2pnfxt+6 4r4L/12BYhMJs3tmJ1lPmpiTRg+Mukq/8qGK/fa58TYRWN4cRKzw2YWclVuFbwNqrjDA l+JtFKARnzpHXkmWKpjRFyjsYNv7uSXLNg3RPs5PlU9ARa788c+EGro0mtQURVkL7hkz OD/g== X-Gm-Message-State: AOAM530w8YBWc9SaQuXbtMXP7Th5JimEuNNVgo2rZ7LptTxCMFmq5cyE X0dDh6o4ryx6rEJC9xckAdBX8DT5GoQo3Jq+gU8= X-Google-Smtp-Source: ABdhPJye0yd9MzxPyNH0rhx5yEnhfxCCAvPgiOY/x5xtl001mExuDgY1bdPTO3kWJlvPkU9PQPtbAYDhXGZ7VYZM/Rc= X-Received: by 2002:a17:907:6ea:: with SMTP id yh10mr40299406ejb.402.1625148050497; Thu, 01 Jul 2021 07:00:50 -0700 (PDT) MIME-Version: 1.0 References: <222b3921-3d9b-47f9-8d13-e6a123f36fad@www.fastmail.com> <9f0c9565-22e1-4d94-bef5-cfc44ce02dc5@www.fastmail.com> <17a5d374765.1289062a2301127.8166821672739325531@limesurvey.org> <8e6ad5a6-f627-4e3f-af04-6384ab6147f0@www.fastmail.com> In-Reply-To: Date: Thu, 1 Jul 2021 17:00:31 +0300 Message-ID: To: Hamza Ahmad Cc: =?UTF-8?Q?Olle_H=C3=A4rstedt?= , Larry Garfield , php internals Content-Type: multipart/alternative; boundary="00000000000041e6b105c61044ce" Subject: Re: [PHP-DEV] [Vote] Partial Function Application From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --00000000000041e6b105c61044ce Content-Type: text/plain; charset="UTF-8" On Thu, Jul 1, 2021 at 3:05 PM Hamza Ahmad wrote: > Hi all, > > While I was reading through the discussion, I found a question related > to the conflict of constant names and functions names. In other words, > `strlen` can be both a constant name and a function name. > This was stated before but, basically, the idea is that the difference between a constant and function or between the property and the method (or class constant and static method) is done on the usage side, if a calling syntax is encountered. $a = strlen; // reading the constant $a = strlen(); // calling the function $a = $this->run; // reading the property $a = $this->run(); // calling the method $a = Clazz::operation; // reading the static property (or enum case) $a = Clazz::operation(); // calling the static method This way of identifying it is something embedded in the language and probably not that easy to avoid. This is why the syntax is similar to a method call, to properly identify the callable without other new syntax. Alex --00000000000041e6b105c61044ce--