Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108521 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 3213 invoked from network); 12 Feb 2020 23:33:02 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Feb 2020 23:33:02 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3BD5C180531 for ; Wed, 12 Feb 2020 13:47:15 -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=-1.6 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_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-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (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 13:47:14 -0800 (PST) Received: by mail-lf1-f44.google.com with SMTP id z18so2706825lfe.2 for ; Wed, 12 Feb 2020 13:47:14 -0800 (PST) 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=AJpctpzrLjY7inHvcoL7t8gWYnv1DzWtRq3nMX12W1U=; b=LlNYsLmyAJ1IXnVknrL8whAT03yHBGUG3pGmRAQe5UowNdqGrZTHs7U+uIMNS0vjnD EQZjEinNw5mZUcetzbiVoo4ABOhyHkjB8P9USKsRIZLMHcJGmF9kdypx++H503ekE4fa mTJmlV68TSOq8JJ9iwBpTQq60MQHSBba8KtQfp4y1FTpHzYhboDI7UdundebeBOexUI2 rbkcRK2XMHXaU0fNJpCaRothjPQAFlqDuCFilUvAuPGXp7iqxaW5RzxyjQzAxVxgXOkD YOz4Brc4qPGFbULw7RSwsrrOnTOBljq4eQw/bFWzyn9miPxB6qiPvkLROw06B7kUFh/C Nm9g== 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=AJpctpzrLjY7inHvcoL7t8gWYnv1DzWtRq3nMX12W1U=; b=rA10TfN2DyJNVp2f3Mnt4Hr9B10kCtXKQWXiFHJ961zCauXl+dIzxklLz5xWoXYTBY CwptyZ7muzb8tCmb12HnR2bvr6ALCST2Kqkkuu0isyFFrxyqDaYil/EmIxqjF/8uDN8H e3FI1VO0Tpxv/CzgVCRXMN23W7ylfCYai9Zzmjos2d5TsP3pENtdcxJ2HDKcJZOv4ydE ezzsoTpnFAKEnrGvGhwzUaakA2wBPypkQphPgayH1ybc6uF3z3P3pu5xeyo7a6JLENwj ovuAqBEjt9+ugNI/310rWQvnJnK3DWY6Ht+S6Gmc6KDCWgmUFXOh0CCPwj0feBJgIpDi 9JOA== X-Gm-Message-State: APjAAAURwR5fTAsmOCKJfZnrJLugXg5S/5L6CLQZkl4pKtJ6aCuWO7k4 Vb9wSBu6YOR6d3FXIiuI4f7DhX7aFOKU8Gxclys= X-Google-Smtp-Source: APXvYqxq2WKAvjhWoWvzd3o0DGFII3/K62DrnwZt+KBx1ofe96YLSX3wrKnWSNCBB8n1uRd+xQfu0GFeD2yoGwaOFHo= X-Received: by 2002:ac2:5e72:: with SMTP id a18mr7623756lfr.9.1581544032570; Wed, 12 Feb 2020 13:47:12 -0800 (PST) MIME-Version: 1.0 References: <9829e5c9-9e32-9686-8ff2-ec7930dda709@gmail.com> In-Reply-To: <9829e5c9-9e32-9686-8ff2-ec7930dda709@gmail.com> Date: Wed, 12 Feb 2020 22:47:00 +0100 Message-ID: To: Rowan Tommins Cc: PHP Internals List Content-Type: multipart/alternative; boundary="00000000000042135b059e67ea18" Subject: Re: [PHP-DEV] [RFC] From: manuelcanga@gmail.com (Manuel Canga) --00000000000042135b059e67ea18 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable El mi=C3=A9., 12 feb. 2020 22:36, Rowan Tommins escribi=C3=B3: > On 11/02/2020 15:13, Manuel Canga wrote: > > One case which string can be useful but a callable would not be > acceptable is: > > > > array_map([I18N::class, translate::function] ); > > > I wouldn't expect that to work anyway, because the whole purpose of the > keyword would be to resolve "translate" as a function name, not a method > name, e.g. > > use Acme\Global\I18N; > use function Acme\Global\translate; > > var_dump([I18N::class, translate::function]); > > # array(0 =3D> 'Acme\Global\I18N', 1 =3D> 'Acme\Global\translate') > # not a valid callable > > var_dump([I18N::class, 'translate']); > > # array(0 =3D> 'Acme\Global\I18N', 1 =3D> 'translate'); > # this was what was intended > > > If you didn't want to quote the method, you'd need some other syntax > that took both class and method name, like: > > [I18N, translate]::callable > > Or as proposed elsewhere in the thread: > > $(I18N::translate) > > > Regards, > Hi, You is importing function and you are using different. It is the same case like: namespace MyProject; use Vendor/Controller; class Controller extends Controller { } > --00000000000042135b059e67ea18--