Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108469 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 8764 invoked from network); 11 Feb 2020 14:02:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Feb 2020 14:02:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1B7E218053A for ; Tue, 11 Feb 2020 04:16:18 -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_H3,RCVD_IN_MSPIKE_WL,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-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (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 ; Tue, 11 Feb 2020 04:16:17 -0800 (PST) Received: by mail-ot1-f41.google.com with SMTP id 77so9820340oty.6 for ; Tue, 11 Feb 2020 04:16:17 -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=IcjJhbBZUncyS60frT6bbKFP48GgAn8zBs6vGrDSBdE=; b=C/ayD+74X6w6aIW0Ay7MaRKDnBLre852+mFBtZxHwmD7WorLEbD2mFYegZF3I7aSo7 0Hwrb6rJmPsbn0N1dhr3cXteK7NtRxUg1fo527wfACDnElgfGbD2xSX/3wcWWsxlqFy8 bC3nCxCGUwmTrRs9ThQG4szgS0BEXnMiSXAAvKlrHwdPvW63QMyD/6arYcmu97PmFwLm kzAeaFQklKSZYetu9Axq9YhVJhXPwnMIpGmCQpYtMu2GVXkmBMttLMrVX5FGLLDOa5om n4eOShKFIut5SvE1GWBBPl3h0ACp7wynNo8TPCc7nepmeX8pWEHUPyII5/crRD1H/NXF M3lQ== 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=IcjJhbBZUncyS60frT6bbKFP48GgAn8zBs6vGrDSBdE=; b=GCn12DGq4YKfvCa+L9tPlvi0JoOsifcqfG+ZSdkXXmfMuGFesnle8ZCYJZWn7q/h5H L86kmSzINqsP5HGxtfFrPeMFUL/Azkcz7o4N36bzX6EO5QLWMsmcv+C1GWUtoGtg0WzV gzfCgjPVQQSyUdZv8FuA3nTVu2tR1Li1kcA/J/IwKasvH9PR3BJLDbLfV69220WgfCqQ zJNRw9ZYMPl5t1Kuo6q+oj0IJJXJwN4HKN6Nab89VcyMQJz6ioDeq4LtFaPIAlOqJGkZ sNwuq5ucG+Gni2jq+ljjsCBY6GbGxCF1VWEb2ieiN+z6whP9QOvmO6ThbSzRyqqfE0ER qq7w== X-Gm-Message-State: APjAAAV0SxD3/FMnWwp4mMw5+dAee4fXtMAoOaNjPmggqhi1/ER3aID/ 8/2jkxu9SQ3Y44oZqlwH8ARAsqWn/F32qRICI2A= X-Google-Smtp-Source: APXvYqzCkry6GNFePuzNgXqr80+O7/3k7dsgJsXvUay5aFEh6jZf3AYgq41aV5FnXY07R7OEMFXupWPfJOfyZM1LLzM= X-Received: by 2002:a05:6830:1198:: with SMTP id u24mr4774908otq.215.1581423376995; Tue, 11 Feb 2020 04:16:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 11 Feb 2020 13:16:05 +0100 Message-ID: To: Diogo Galvao Cc: Manuel Canga , PHP Internals List Content-Type: multipart/alternative; boundary="000000000000a01a03059e4bd2b2" Subject: Re: [PHP-DEV] [RFC] From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000a01a03059e4bd2b2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le mar. 11 f=C3=A9vr. 2020 =C3=A0 12:52, Diogo Galvao a= =C3=A9crit : > On Tue, Feb 11, 2020 at 8:14 AM Manuel Canga > wrote: > > > > Hi internals, > > I Would like to present a possible new "::func resolution" for your > > consideration. > ... > > use function \My\I18N\i18n_translate; > > > > $mapped_array =3D array_map(i18n_translate::func, $array); > ... > > What is your opinion ? Do you see it useful ? > > I've wished for this on many occasions and think it'd be really useful, a= s > long > as it could work with methods as well: > > $mapped_array =3D array_map(I18N::translate::function, $array); > > For what it's worth I guess it could just return [I18N::class, > 'translate']. > I wish this would return a Closure instead, making $foo::function the equivalent of Closure::fromCallable($foo). Nicolas --000000000000a01a03059e4bd2b2--