Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109285 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 8535 invoked from network); 25 Mar 2020 12:26:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Mar 2020 12:26:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B3EE11804C5 for ; Wed, 25 Mar 2020 03:51:32 -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=0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, MALFORMED_FREEMAIL,MISSING_HEADERS,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-vk1-f177.google.com (mail-vk1-f177.google.com [209.85.221.177]) (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 ; Wed, 25 Mar 2020 03:51:29 -0700 (PDT) Received: by mail-vk1-f177.google.com with SMTP id q8so522619vka.8 for ; Wed, 25 Mar 2020 03:51:29 -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:cc; bh=v7CjK0GY4icEpBzvCXzvouSA/SH41ZjsELj6TXGT3ok=; b=Cnk8UfjyojEHJE3e9mPbFJnYk1ds+M1TPZ7E+VfD4zWuZRe8sOMOA7XQiD4aIGgd2Z Q5lQis7TrkHcthvNss+O4h+7E7p0oGrYNCuXkg5S4MiEk/otlaig1lKm3NBOM6DTZa5Q LZLMT+ppr7tWlmOjcDG+nTxCSVCkM9tozOBZs1DPrrSSSYeQwYgMbjcqLtpIm73ZEtdw 6UodZdQ3pl9NRRuf7Hr688n76EZaa25ACaeEh9Yu4aHC7y2g/wZSjGtme9NZvnYqycqy 8yd+BflFor2XQgTY+LHqJzk3XnhhPdC1hmJJzI29gyvW2CULXC58DbZ1ZfYEzDbrifAJ X6UQ== 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:cc; bh=v7CjK0GY4icEpBzvCXzvouSA/SH41ZjsELj6TXGT3ok=; b=QO/DoaeAOFOYJ8Yzbi4V2iUrSW1WruNKLVSbP62VG1gDGZAEzbJEPHW4Clh5Yc9FJv mmqgjITxxtDWHUj+oiFP8uVgAlTaU79j9uFvLtB8M7Ow6i6+WC2czuLA2dJgIBXasFSk pgskpghNc6RTL+ELoCnNm5A+oc+y7HRJizq0Afckvl0zaAIh7hmZblB2bQ0QJTbPtl3U kFiODeAViel7n0HhoQ6Gt1aoxWH0tthLmjXg+S2lFgMR2dBwTNZR9+bb7xwmFx+T3apy srlr5FsgAr9SzlAL80IPfZg8qzrMGJrQULzb8DXBLp1hYv6dwLs10Ke02ov2X0NaZPB7 1AFg== X-Gm-Message-State: ANhLgQ278uqRvhLOXm4/Vwfmjk8nUGjserxhb43Zbpxt0uGlc7jl8x11 M8ZHuH1v5nM4eAHtGe39nsPmaCiDDztx5weRJIhaSjOulFa8Ig== X-Google-Smtp-Source: ADFU+vtJq9sL68gSYypC/QkgyskNcCCYwGxNdxTRtHmPay/6Atn4z2v8sMlKpgFm9bUxWIOzbL86YXOoUVbxaEa/3LM= X-Received: by 2002:ac5:cdbc:: with SMTP id l28mr1548360vka.67.1585133487608; Wed, 25 Mar 2020 03:51:27 -0700 (PDT) MIME-Version: 1.0 References: <42f7af27-7140-4fbd-96c8-5c313f86268d@www.fastmail.com> In-Reply-To: <42f7af27-7140-4fbd-96c8-5c313f86268d@www.fastmail.com> Date: Wed, 25 Mar 2020 13:50:51 +0300 Message-ID: Cc: php internals Content-Type: multipart/alternative; boundary="00000000000073589405a1aba6ad" Subject: Re: [PHP-DEV] Re: [VOTE] Object-based token_get_all() alternative From: lisachenko.it@gmail.com (Alexander Lisachenko) --00000000000073589405a1aba6ad Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, internals team! I would like to propose to rename the PhpToken::getAll() method into the PhpToken::tokenize(string $source) or PhpToken::lex(string $source) to use a more meaningful verb word. After renaming, it will sound more natural: $tokenStream =3D PhpToken::tokenize($sourceCode) Best regards, Alexander =D0=BF=D0=BD, 23 =D0=BC=D0=B0=D1=80. 2020 =D0=B3. =D0=B2 19:04, Larry Garfi= eld : > On Mon, Mar 23, 2020, at 9:07 AM, Nikita Popov wrote: > > On Fri, Mar 6, 2020 at 10:33 AM Nikita Popov > wrote: > > > > > Hi internals, > > > > > > I've opened voting on https://wiki.php.net/rfc/token_as_object, which > > > adds a new object-based interface to the tokenizer. Voting closes on > > > 2020-03-20. > > > > > > > This RFC has been accepted unanimously, with 47 votes in favor. > > > > Based on the additional feedback in this thread, I'll also add a > > __toString() method that returns the value of $token->text, unless anyo= ne > > has objects to that... > > > > Regards, > > Nikita > > As long as __toString() is overridable in subclasses, that seems fine to > me. > > --Larry Garfield > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --00000000000073589405a1aba6ad--