Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124520 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 4F8C11A00B7 for ; Sat, 20 Jul 2024 16:51:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1721494389; bh=1IVTh6gqVzuA3/pQIpzTnOwx9D6YzdrCxk0T7jc6hbE=; h=Date:Subject:To:References:From:In-Reply-To:From; b=H3i5soW+/e+5IMMiTL/nwOIhV9kBx0G04fH4wz9Z0zOk+0082tOxQnoY9NhB1Lf04 jIa9Fuuo8mDAh+4R4E1TSSZ4whHOY3OgUMZfWjUz/xuY7eLDXVwKmNvkkgJgWosWyu 9dTRSoD73OgrRDeVKlG1MtCHgUBB7J3XCjDhaTKtu80LnkAzS++dsyIBDbWcHfPzmt QRWPxw44PBs99j7vnpua4ALU9ATRIwkXR4l5PtVE5UgW+Om5hiB/bphqx+5KzhDSO/ if/GL4qRnVgrrx0g5JjRile5aNLqxQBfVsqcQFEgR8E6OPQVf8Xa2eHycImqlS3dTw uM+IDQZHjau2w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6C2C1180039 for ; Sat, 20 Jul 2024 16:53:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 20 Jul 2024 16:53:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1721494294; bh=2X09JpymbVcepTnWZ9kDa5Qd+j7mngTGo/EhBny7zzY=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=dpf31Ne3h6lsuY5BTEpx+t8BvqIV9QKe56zvrCYpleYrnNB4cwEyr4MTGqVr8WOxR q0FL5krVJciUADWqvQOpX2Cp8M4c75Ya1ue3S68P1WdI/yDbDqE4lokgQhYZ8tuKzp AbdhEnQCCRX0e0CVIL/8x8USC79Ck6CPrPrAp5REI9p9eBVDoGuxDQqSTgLytYyMyC crhkbMgs51AkWHlKjRRHOrytF328LMpxbxWPksAoY8CtyXfG6NNxKByTlGyL8PR4zT /6d2acJo5PeAXrfPOPTgREvNdYF7cSow9kZTZuK8F6u3I2JQtYmeHiHZ+U1W7mQjVB YqpesktI/ovIw== Message-ID: Date: Sat, 20 Jul 2024 18:51:33 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Subject: Re: [PHP-DEV] Request for opinions: bug vs feature - change intokenization of yield from To: Juliette Reinders Folmer , internals@lists.php.net References: <66984FD0.5090805@adviesenzo.nl> <6699F817.8070806@adviesenzo.nl> <9571bb82-9873-4319-9bd1-0361748335be@bastelstu.be> <669BDB00.70507@adviesenzo.nl> <669BE870.2050908@adviesenzo.nl> Content-Language: en-US In-Reply-To: <669BE870.2050908@adviesenzo.nl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 7/20/24 18:40, Juliette Reinders Folmer wrote: > Tim, you're making my point for me. This is *exactly* why the current > change should be reverted. I am not sure how you read "PHP users have no idea what a token is" as an argument in favor of reverting the change, because reverting the change means that completely reasonable code suddenly stops working with a parser error in a patch version and PHP users will rightfully come to PHP's issue tracker to complain. > And not, like it is now, an undocumented, random change creating an > inconsistency in the Tokenizer. The tokenizer is doing the right thing: It tokenizes the PHP source code. It is absolutely normal that PHP first and second-digit updates make changes to the token stream. New tokens are added, old tokens are removed, tokens may appear in places where they previously could not appear for well-formed PHP programs. Tools working on the token stream need to adapt and this change is no different from any other change to PHP's syntax in that regard (except that documenting the change was forgotten). Best regards Tim Düsterhus