Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108576 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 42474 invoked from network); 14 Feb 2020 15:29:44 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Feb 2020 15:29:44 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A1FF51804F8 for ; Fri, 14 Feb 2020 05:44:24 -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-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.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 ; Fri, 14 Feb 2020 05:44:24 -0800 (PST) Received: by mail-io1-f44.google.com with SMTP id z1so9991071iom.9 for ; Fri, 14 Feb 2020 05:44:24 -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=SIcHNzx0kR+3v93flt2n3YKkYss91iLgRHsJTM/IHig=; b=B0hJ2XQGkVD86Llle5aIXoNNJXqKd0ebJZm8kfBJD9bGidv4a+4MTxBiCpcXSuC3vk HcaUN4WMKMIPqvhGorqRK5dZtFHx7u3M9dLGITaTiHRKKh0W07GaBX1XUi0wZz6g/5Q3 voIIPzu6NWnr3B2jvwkA8aw1opaIussPwmtn5TXlf34kRbezlo5ofLdOGJu3l3KPNgk4 96tycxxD+OC+MXnA3TTzjCneldY+K8KzCOZrWS0Nn7PTDMV8xbwHKW24LeB2JPxaJxJT cnc8oci2Df3JLOWzRfpt14eiKHcQ4Ltg4L6vfvjCf3LQQgTxf+EsYUy9PgkIth/SJSul 6a3A== 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=SIcHNzx0kR+3v93flt2n3YKkYss91iLgRHsJTM/IHig=; b=Szc3fdpIHZ92uL9Y3mJ19MHhFNrBbrruKu3IoibsDOAI7UPslMQzE141Qo5K8f6a0a 9e95vn5vG2CUj9j92phRsSJLuQW22yZk8toU9aK7YSQXZfdBEQ7HcLVkorZB0Pd3Jtln Lfpjj5iZ4Nr8vnhKbwJxwJLFh2PU+GruFW1tnBYNBiZESUfndCpJVML1Vn+c8JwNhZng I2/axu4PikOB+tFdpLB7IR8hetY2OXj41S1XKXONPrKdYcbf8qRfL6tSuqaMC/q2efXZ EypeHRNaHC/UH29IONJYfOaV+yV5sfGrv9r6ZM+KRvhy/O07eDZasGG5hVNjJiuCA4Eq o/Eg== X-Gm-Message-State: APjAAAX2VAXRHg/Ss1Nb91zeSXM1+RuLLVz5WBKtJYJtmh/gkAaoo5bH Jo3Wl73DpuWpzNCcRfoe2F8Q110V8xWLrwxCTXo6MWid0qI75A== X-Google-Smtp-Source: APXvYqzvX99WmidwCMduxQlGGX+K0yYrK1RYKVALTo/SpPGXBBgtFQ0Y+axYmCB9ZSdpntnl0sMLFpRxFLchZoKfE9Y= X-Received: by 2002:a5d:8cd6:: with SMTP id k22mr2207539iot.283.1581687862254; Fri, 14 Feb 2020 05:44:22 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 14 Feb 2020 14:44:10 +0100 Message-ID: To: Sara Golemon Cc: Nikita Popov , PHP internals Content-Type: multipart/alternative; boundary="0000000000002ce103059e89677c" Subject: Re: [PHP-DEV] [RFC] token_get_all() TOKEN_AS_OBJECT mode From: ocramius@gmail.com (Marco Pivetta) --0000000000002ce103059e89677c Content-Type: text/plain; charset="UTF-8" On Fri, Feb 14, 2020 at 2:38 PM Sara Golemon wrote: > Thanks for picking it up, and I agree with your response to Larry. As nice > as it would be to lazy iterate, the scanner is just in NO shape to tolerate > reentering userspace and potentially reinvoking the scanner before the > first run through is done. > If this is the current state, maybe it would suffice to declare the return type as `iterable`, and return a strict (fully populated) structure in a first implementation, later to be changed to an iterator, if applicable? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --0000000000002ce103059e89677c--