Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108530 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 78624 invoked from network); 13 Feb 2020 09:19:47 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Feb 2020 09:19:47 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DD54C180532 for ; Wed, 12 Feb 2020 23:34:07 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,MISSING_HEADERS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, SUBJ_ALL_CAPS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.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 ; Wed, 12 Feb 2020 23:34:07 -0800 (PST) Received: by mail-wr1-f46.google.com with SMTP id g3so5330162wrs.12 for ; Wed, 12 Feb 2020 23:34:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:cc:from:message-id; bh=xLfWRO9akeXOAcA9w6wjfkzSyGkn0iOg8KEeyveLfzM=; b=FCqAC7wAeeMpN64U6s/ru9cWWbkiUE4pUMNt76kM+rTU5I1t11yERFXQv+YCdxvz78 5IzLFmV5oeuGudc975pGxBO/v0XstlnSjZbz5EDDRXRo3RUG+5RqqqIu/QNUl+f+kUX9 DcSRav/ZrivWQpOjKGaCrSv7Y5Ny5jfUDrvk00r9y3/pMy7jcC9emNAizGkIQAxnq1ig 2+Oe89zjC3xYP78rNJcmkszD3fHp+BQ2SqH2WRZ506CAVv2YGzPSADbQ8vOveQIxd0JW 3Fh0GdD+RTErqalVmmt751L2ezk6oMy0gx6PcmOaHjTVal4v0sF0bYNNrpzwx4Zp78Jg CL+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:cc:from:message-id; bh=xLfWRO9akeXOAcA9w6wjfkzSyGkn0iOg8KEeyveLfzM=; b=M32yj5X8n7PO/DXjMJjDdF9oLayya8EEvvJ02lrdw998NoJLNPNlfaq7ac5t5jXLa6 vAUjj6wBpRrfybjluAoddwbXN1ZuUi3NTKK4WajUY7ZgB0An2csAB9zETyNQ4pKrQhzP N4bz7zsC217IftA2mWvw+Zmt5my5nQThlXcPHULH3WZbTbqk+XCUcPcFBZpvUEJ1c/Y8 d54U17x4xOKvpPcj5DFBaVLopYMl/tWp8x/ePjch/4I9zFeqAS9gilkGIlNTuJW5bURY gVrWcPBED6KmdOCxm9RpIkKS6fd+yRIK62hyCrR02ABGfnKLQITDKn4DWUZAwYJ9Dyg7 Thug== X-Gm-Message-State: APjAAAUqn6cktmRpsn4u+ajRgkaq7NMvBoY+k36v4Qlg1OF7WsZJ0LPj U+BdjTYGZ20A8YKZAeTAfxs5OsfJ X-Google-Smtp-Source: APXvYqzA3NpTxsvcUlGYy0QlTRHZzN5awir+Qz1fJD1P3AdZ+cWAOAsCe4OCOVnaKjwuINHMbXwv4Q== X-Received: by 2002:a5d:4e0a:: with SMTP id p10mr21293119wrt.229.1581579242211; Wed, 12 Feb 2020 23:34:02 -0800 (PST) Received: from [192.168.0.12] (cpc84253-brig22-2-0-cust114.3-3.cable.virginm.net. [81.108.141.115]) by smtp.gmail.com with ESMTPSA id n13sm1869370wmd.21.2020.02.12.23.34.01 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Feb 2020 23:34:01 -0800 (PST) Date: Thu, 13 Feb 2020 07:33:58 +0000 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable CC: internals@lists.php.net Message-ID: <10FCCCED-B8AE-4394-91B3-0FEB448E2398@gmail.com> Subject: Re: [PHP-DEV] [RFC] From: rowan.collins@gmail.com (Rowan Tommins) On 13 February 2020 03:33:32 GMT+00:00, Mike Schinkel wrote: >> On Feb 12, 2020, at 5:47 PM, Rowan Tommins >wrote: >>=20 >> On 12/02/2020 03:58, Mike Schinkel wrote: >>> Returning a_closure_ instead of a string would be providing a >feature we_already_ have instead of one we do_not_ have=2E >>=20 >>=20 >> Not really, because you still need a way to get the fully-qualified >name of the function=2E This is not valid: >>=20 >> namespace MyVendor\Something\Foo; >> function bar() {} >>=20 >> \Closure::fromCallable('bar'); # Error: tries to resolve function >'\bar' >>=20 > >Why would ::function return a short name instead of the fully-qualified >name?=20 I never said it would; the intent of this example was to show what is poss= ible in current PHP, in response to your comment about returning a closure = being "a feature we already have"=2E The key new feature being proposed is a way to resolve an unqualified func= tion name based on current namespace and imports, without calling the funct= ion=2E The open question is whether the result of that should be expressed = as a string or as a Closure object, but in current PHP the feature doesn't = exist at all=2E Regards, --=20 Rowan Tommins [IMSoP]