Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108765 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 23036 invoked from network); 26 Feb 2020 07:43:20 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Feb 2020 07:43:20 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0E174180211 for ; Tue, 25 Feb 2020 22:00: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=-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-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) (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, 25 Feb 2020 22:00:52 -0800 (PST) Received: by mail-ot1-f49.google.com with SMTP id b3so1907524otp.4 for ; Tue, 25 Feb 2020 22:00:52 -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=IKp+I8w3kVHhHc/ppI5F+FPAUJtapZgKp/wQzfgr4ao=; b=YBMiRWMimj4bqReM9GJAhrJdbG8fS4K0a6f0qyL38DbAafo24WkYrYLJ7/WSpGu+pY CJwj/Wo/rP7EtfbARi/HsaF1S3ROG4h9awRrqw03mNWcz/zO30fh1hq2v8UOLd0qWjkg rdTMOKTOzmKKQpPWNijC4a08aq/B4PH7H5IWPC8E3luimdgjR3qiytZFr32VmmXTMprH azCLgkiHOE2FoeHiUTb+9a3tXgFzSrp0bsYCnF/BGUiZk737YF4G7WYKKheSHEqIIjZd pzLG8+5A6L1HbkuH/yW78xYYE3jdcWMAZqWmXn/ZNsNwJ+649D6BF1Ye9sXwC5HxK8Q7 kChg== 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=IKp+I8w3kVHhHc/ppI5F+FPAUJtapZgKp/wQzfgr4ao=; b=RagJsNUrqS2ylMoIHjJdoY2LPPi6s1NMo/ydSevhhizqZVbdXuvtPn51PhHtFmBwi/ AGiSFeG5WjrYPr9odC5iylLRjwb/LJmqHg/OP1wxJL6JP3MZRdxAdbr6pE9EcU2GyjA0 C7Yy8rpW8FwB/ZM8VbIVJ7HoVyAS5pEKSq0YGObl3r/5nDmPMwxnM4xrWmthogvu3G5M udbet5iFYdZmLqfVDWNp0Oxs2f7lGhPnwTlwkf28EwFyN0i4xqb+AW9S/8J4DJkZDl9j qB/Y7eWAAiIxa53MiRvC6+PV7Zl/2Zq+B8Dh1kInPIICtFaAlNDv5P5ya9f+aCsLt6MO j3eA== X-Gm-Message-State: APjAAAVOtdNJ4FlOAwqN3eyXMPzlbDtANG/6SaennN+fqs90+AYCq8Mj fRYDtujvFv7AIgV9bBehBIcvRs4lybygbusYaCc= X-Google-Smtp-Source: APXvYqyjnG2AnBzNX5041yEV7LAlZ4y4hfdvvCucyN1qe1KD4l/nt7Ryx9shcWgVjJ8HeVYuaNKcwkYrmJWqXPMP/yQ= X-Received: by 2002:a9d:7d8b:: with SMTP id j11mr1759371otn.259.1582696848096; Tue, 25 Feb 2020 22:00:48 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 26 Feb 2020 07:00:37 +0100 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000006b013b059f7453bd" Subject: Re: [PHP-DEV] [RFC] token_get_all() TOKEN_AS_OBJECT mode From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Brzuchalski?=) --0000000000006b013b059f7453bd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable czw., 13 lut 2020 o 10:48 Nikita Popov napisa=C5=82(= a): > Hi internals, > > This has been discussed a while ago already, now as a proper proposal: > https://wiki.php.net/rfc/token_as_object > > tl;dr is that it allows you to get token_get_all() output as an array of > PhpToken objects. This reduces memory usage, improves performance, makes > code more uniform and readable... What's not to like? > > An open question is whether (at least to start with) PhpToken should be > just a data container, or whether we want to add some helper methods to i= t. > If this generates too much bikeshed, I'll drop methods from the proposal. > > Regards, > Nikita > Hi Nikita, I really like the RFC itself and got only one question regarding the class name which I couldn't find an answer in RFC. Why PHP prefix in PhpToken class name? Why can't we go with Token class name alone without the prefix? The only one which includes PHP in class names so far are only: * __PHP_Incomplete_Class * php_user_filter Above taken from https://www.php.net/manual/en/reserved.classes.php BR, Micha=C5=82 Brzuchalski --0000000000006b013b059f7453bd--