Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108459 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 87126 invoked from network); 11 Feb 2020 13:00:15 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Feb 2020 13:00:15 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2E24B180210 for ; Tue, 11 Feb 2020 03:14:08 -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=-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_H2,SPF_HELO_NONE,SPF_PASS 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-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 03:14:07 -0800 (PST) Received: by mail-lj1-f176.google.com with SMTP id w1so11112374ljh.5 for ; Tue, 11 Feb 2020 03:14:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=HOLx6Cn5mnLcdb60HIErY9dROdgDdUHbpnY7I0o8i78=; b=ZKkfA2WMsCDcOsk/REDWfDg4OLC+QFjQD0SkANgh/3llhKAxoDo3jGi0QL4XAyMBTp nbHiVhrJbpVrxWVR9K7CxLVK09hmago3FTHYz9GT3y72j4UiePnys9jIjF4tgr2I5Tdw aONv51JGbLkHTSJ7ggcQxvEouu2MEHEWjBpWJG+s/xF0NLq40xjicEwyU37L/rOHDfMn XUX0JwiMpjnbrJbl3yIxC0TMak7EnfhxMjE5drgXWoBiBopHE8WcseRqQ+ydnDCXMq1h yuNVygCdJshOkCTWlyXrda3Qv4m2UevjkloZ7KvEcYc2yYUXfOr6DkRRKbdS9DCYoq1T bj4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=HOLx6Cn5mnLcdb60HIErY9dROdgDdUHbpnY7I0o8i78=; b=EtIkJAvFG3s/DbeDH3N0zEDjuiDnpOsJIk1G/qlFVbmI7LBcUziWXQBxC0MuTXUOGx q2VL30i4YbGOx3nwAuGQVeiVw7Pg22XU1446KwKEEHg5pB48O041Eho6uWkCp/5nGCfE M7ROAYn0ceyPRJGAuV7knbMNzWzOmre6VCIOdOEzSmDjyYeI1sCvNlFRGnwMwzu8YMdF M6gS/MQQ8rjgSxqLxDHSIOD/NpPHfGICtbZAfb04eoB9QXFPyLxthm68JVYurwfxyXNj EV2eKRph6Z72d6qYwgow0RYnjo1G/yrsKAEvkn9e/lhBfB+SXkkUpQiCSOf/KEJ6SFM/ 5gvA== X-Gm-Message-State: APjAAAU7VMpd3HaJjtgREjKlV9yv5W69Aut4aSyPWz2JKiULrCZqXjqn dwVGLyz3mIfWitOPXuWnL4ayREChvsRGafQiAmUCXLqcrpQ= X-Google-Smtp-Source: APXvYqyC/As9J8CRIDHsblUG/m9IBCSKmHTGgHrRk7N7OBQGsllKlSKtalToWe0qa+EMDi7jA2nB6EDpnwRPcLkw+sE= X-Received: by 2002:a2e:b0c9:: with SMTP id g9mr4067567ljl.134.1581419645709; Tue, 11 Feb 2020 03:14:05 -0800 (PST) MIME-Version: 1.0 Date: Tue, 11 Feb 2020 12:13:54 +0100 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000003936cf059e4af4bf" Subject: [RFC] From: manuelcanga@gmail.com (Manuel Canga) --0000000000003936cf059e4af4bf Content-Type: text/plain; charset="UTF-8" Hi internals, I Would like to present a possible new "::func resolution" for your consideration. In first place, PHP now support "::class" in this way: use My\I18N; $mapped_array = array_map([I18N::class, 'translate'], $array); It avoid add Full I18N namespace in callback. However with functions is different: use function \My\I18N\i18n_translate; $mapped_array = array_map('\My\I18N\i18n_translate', $array); What is the useful here of importing the function?. My proposal is ":func" in order to avoid full namespace in callback of functions. E.g: use function \My\I18N\i18n_translate; $mapped_array = array_map(i18n_translate::func, $array); "::func" should validate if a function with `` is imported. In this case, "::func" is replaced with FQN of this function, otherwise with only "" What is your opinion ? Do you see it useful ? Thanks and I'm sorry for my English( I'm a Spanish ). Regards --0000000000003936cf059e4af4bf--