Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111821 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 9909 invoked from network); 3 Sep 2020 15:34:26 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Sep 2020 15:34:26 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 33E2D18050B for ; Thu, 3 Sep 2020 07:39:37 -0700 (PDT) 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_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-oo1-f53.google.com (mail-oo1-f53.google.com [209.85.161.53]) (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 ; Thu, 3 Sep 2020 07:39:36 -0700 (PDT) Received: by mail-oo1-f53.google.com with SMTP id a6so826730oog.9 for ; Thu, 03 Sep 2020 07:39:36 -0700 (PDT) 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=/vL24YpgxhUJZ/6mArqYvFC748n+37LZ6C7KVCiIAYo=; b=ncKuOcf27un1bq/tw03Q0dAm0imKcvsWogqpR7DaWlUH9Xq1FAKzh+tgVxQqP8YZP4 qepGRv+133qPW3l17EZMWmvLyg2WgYaghW3UtY6Qz02oK9ifUkdvAnOZKv/0cHCiEkoT CAaY6BYPP+sN+g3pCQHilQrsOO95sSdOxen7uH6kz4bJmfCd8eV9Gv+j6tTCu1k5Hkyb lf4e2r2U5/woIO3aeWAtyQjavbJgxS3VArW4q/9fBNXnOMftF2EQyMfXI8Omr0mEw9rB zNtU6O0K8c8irfiML550A0dAi2SyniFh19wIsuP/oFcrVYCnanfMl63DeziU4XR5jYMl UZog== 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=/vL24YpgxhUJZ/6mArqYvFC748n+37LZ6C7KVCiIAYo=; b=oztbmzgBHVtRCBpllFaIsWn56Fv58G0AzB9T4sYFWllETTsXxXQqD2Zl71vq/s0PMO 35hjDE1XnwQz9sLx/uFwozkkHtTD15xVjUo9ALPiwhDxLP5eHGQAqAgvW6CE3C1T8NxD AKqGYq5JxZ8lypE4bpipKaoNgCK4i6PZCnwVQNBtPnZA0/8mlzuf8jaHVpEyBSpxJTbo /kwOn1ZIs4OK/2ECPA5x6gZaTGIrmK3qh+NqI+ILsxTZdoKaRXxlI7LYZ6btWhjd2qjv POukmzhxrabnndO4eRc5cOyExjnzyCK8fU/i4OHg6lpx0AblDsAkrtUvqnKsmCfP+JZ/ 4rYQ== X-Gm-Message-State: AOAM531wR7sD+echBnDilbN/5hQL8uy5PzHX7WAF4geSUAc/0Aclifjx V36WCaP1dkgiHxDTXS0A0moc6igBnxQncMaaeMA= X-Google-Smtp-Source: ABdhPJzLJ91bxWFAf/mGUO6tgX0jIGSzz5v9/vtvhp+lbNSCnfTqLSt9hsCKLnjdw7aa6AMhfAm1+FN/rBAlpJSr400= X-Received: by 2002:a4a:c909:: with SMTP id v9mr2019791ooq.43.1599143975038; Thu, 03 Sep 2020 07:39:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 3 Sep 2020 11:39:21 -0300 Message-ID: To: Sara Golemon Cc: tyson andre , PHP internals Content-Type: multipart/alternative; boundary="00000000000093b06505ae69b813" Subject: Re: [PHP-DEV] [RFC] Global functions any() and all() on iterables From: david.proweb@gmail.com (David Rodrigues) --00000000000093b06505ae69b813 Content-Type: text/plain; charset="UTF-8" Do you think that it could be proxied too? I mean, optimize foreach (array_keys()...) syntax to not call array_keys() in fact, but a optimized version of foreach to handle key only. Em qui, 3 de set de 2020 11:36, Sara Golemon escreveu: > On Mon, Aug 31, 2020 at 6:56 PM tyson andre > wrote: > > > I've created an RFC for https://wiki.php.net/rfc/any_all_on_iterable > > > > > I've probably reached this thread too late, but I'm going to throw out my > old chestnut that these things don't belong in the engine. They belong in > userspace. > > 1. Instant forward compatibility (any version can run `composer install`) > 2. Instant bug fixes and improvements (no waiting for the next minor > version of PHP) > 3. Better visibility from the JIT (not having to cross userspace/internals > border is good) > > And that's all I'm going to say because I'm pretty sure I've lost the > argument long ago, but here's my any/all/none (and other) methods from > years ago (IN USERSPACE!): > https://github.com/phplang/generator/blob/master/src/iterable.php > > -Sara > --00000000000093b06505ae69b813--