Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108464 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 99415 invoked from network); 11 Feb 2020 13:37:59 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Feb 2020 13:37:59 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 60DB618050A for ; Tue, 11 Feb 2020 03:51:53 -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.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,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-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) (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:51:49 -0800 (PST) Received: by mail-qt1-f174.google.com with SMTP id d18so7654225qtj.10 for ; Tue, 11 Feb 2020 03:51:49 -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=lqIkzoDkynx37aiB91P4nLKuHB+WlowmmVTekQSd5KA=; b=f7bTziMxC6MQTHcx67gVhkeg+u7FSLmdQOd/U/A89jqL4m3v9IOB1VJqzkmC5qq2OH ZAEy8DM3V6fHCc+HIAzp8NLpk5kqCcNHjMdLa4+UF2BNljyOWTQtTuZPsYO79H8poPax ay+B80ZnxkfGBYGapw9CY0GsfMnRPoQ9usUhYsXoyitGKvRZqhsftTAzaL6wv2BnPItN EcFgw2CMNcYx62qP00BYhRO862QV8d2QKGEQo7SeaIr2Vdp0/hc6ahs3tHRGpuGQnVH0 hClSOZ0groQ9qIsc/O7F9nKcI3+SHWkskxP6tBSWRSL5ozfCbIbGiBZ/eWyBWbcf7dot i02w== 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=lqIkzoDkynx37aiB91P4nLKuHB+WlowmmVTekQSd5KA=; b=YoxB5WQ3i0eCwHDLPbF8tZst44SRg+QuH1pcQXJNu/zrim4Tnl6Pb05Bldr+iPSroG Wdnx74Uk7T9+OChWHGbhOD8XjmX7Sxb2aGf4iyMbWxtQZzeeKyPtvGMbNIcx6bObHX7V /TdyDeZHng3vmQm++9/K4/ge6QMpE0mNxZZdIpaDbyODni+hQmTLqudUg1Rp6fnLorJ5 g+l2qiOC4VIbfYUm3szceEKVaNgxO5sANEIKaLe7KY7jBAdp27E2iGSxE+qiHyFH3wtK oLeoFMOnJOKKgI9uTAZ7wVnA6TCAc3/U9olyJcB1vmpZpibkMFcrLSEQymHD0h2FGl80 eNOg== X-Gm-Message-State: APjAAAW8LHvcJAftNjbCkdE3vBA0SCMmpU5TGzlhmvjdrVXqq7g1M4Hi aOCa+0+ujMzOKom1cgo36aIMSFxZH61Kjd1nxRWBM2fh X-Google-Smtp-Source: APXvYqxinY7sy5b7mj0Ijqir7lmylOdUXy1gfL+5RwRSUTbfon9AYwSoE6luhy62v2gojD8QKMn54wRn9ScZfETiSiQ= X-Received: by 2002:ac8:71d7:: with SMTP id i23mr14625006qtp.50.1581421908486; Tue, 11 Feb 2020 03:51:48 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 11 Feb 2020 08:51:39 -0300 Message-ID: To: Manuel Canga Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] From: diogo86@gmail.com (Diogo Galvao) 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 = 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, as long as it could work with methods as well: $mapped_array = array_map(I18N::translate::function, $array); For what it's worth I guess it could just return [I18N::class, 'translate']. Also for keeping consistency and avoiding new keywords wouldn't it fit better as ::function instead of ::func? Best regards. Diogo