Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111709 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 96798 invoked from network); 29 Aug 2020 20:21:54 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Aug 2020 20:21:54 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B134B180538 for ; Sat, 29 Aug 2020 12:25:52 -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_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) (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 ; Sat, 29 Aug 2020 12:25:52 -0700 (PDT) Received: by mail-oi1-f175.google.com with SMTP id z195so3661737oia.6 for ; Sat, 29 Aug 2020 12:25:52 -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=MgU1dlv1LD/eqFdDOwym0fxCHx00Ur4P3/NCpwvu6og=; b=rkMXJIdIFt9FussyhnCv5Om04ml6y9hB/RFtzBkjCVc/Ckj82aOPcLb2j2ptLIXx6W qwkwiNgsg7bn1yBBzLNVsMkpTDi+3CLkR0NBx56ET/0iMXc35NiCz7Ux0mChwQBdZGBX js+AwlsA8t+llq6qx2iXabkFkozXoRcdPgtv8uIZRK2u8Wph1Jppic90m+iCceUpgT+Z iTLTtm1bf/xt3d37tBOu5KQeOCFq24zLfe4EdIl4gOCuGcrROUENlu+jQwnH0Y4rCAld /McFrr10KS6/PmmEmvQ5SAXhY1+dgLvTn7qcJmTVOI/bw6oJVgAVR45qa2ENSboW8WXP iz4w== 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=MgU1dlv1LD/eqFdDOwym0fxCHx00Ur4P3/NCpwvu6og=; b=PCB6xhq98lti6iuu9b2BBvwGBd0iUAA6lZLIvB25P1wZ+uhF8WX3lMjuJMSHSOV0Uh i3kHaljcVSroXPf4vi5J1L5UDMP/TZERSXgUhf75HS7dd//ngdEGWATGmgj1ovaKwosU 2Ck69JJ5ItS9f1eE5lh5OvPBdKX16IeNXE3d9QpB3eSZ76r3gJsH2HZUBxQtAApN7vIq 4xHvXk8oWmQSS6s/ML3xDTuHuVE1Sc8uYH3DZvx5qUywfTF34xnh9IcDpAKizW/wg+HF 4WBiTzFkHAJweoPWdNB8lxEgXNmVjC/+b9cOmQQBWBmkX5A5gJl6nFJPSaVlVOHGpLxP ICCw== X-Gm-Message-State: AOAM530vl1F3V3dFgwnM9Fwt9jFNsMqchyDJaepP0h22OLC5Z1T4NJsT DrKndqK2L8D5/AiQaL7xyXhyrWA/anCrokgJ+Fs= X-Google-Smtp-Source: ABdhPJxTUvF3lLNK2J/mmRUF6P/eKYw8gZA4rtE+myGYxf8KgSQqas21hQKj2+KIGfSGUPoe3GK+Mc43AdIdrIPNz2Q= X-Received: by 2002:aca:6708:: with SMTP id z8mr2544205oix.96.1598729151489; Sat, 29 Aug 2020 12:25:51 -0700 (PDT) MIME-Version: 1.0 References: <5f4037e3.1c69fb81.e0b66.dcd6SMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: Date: Sat, 29 Aug 2020 16:25:40 -0300 Message-ID: To: tyson andre Cc: Ilija Tovilo , PHP internals Content-Type: multipart/alternative; boundary="0000000000002aa8c505ae09230f" Subject: Re: [PHP-DEV] Re: Should hash comments be deprecated? From: david.proweb@gmail.com (David Rodrigues) --0000000000002aa8c505ae09230f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I have suggested on past a declare() to help in cases like that: declare(php_version =3D "8.0"); It could be declared to new PHP files, so old files could supports # as comments and new files will not. Other option is supports escreveu: > Hi internals, > > If it turns out that the impact on legacy applications, legacy libraries, > or holding back upgrades is a concern for others > (I'm not sure what the most common opinion is), > another option would be a system ini setting > > `hash_comment =3D 0|1|2` > 0 - disable `#comment` support completely when parsing/lexing - throw a > ParseError while lexing and return T_ERROR in token_get_all > 1 - (default) emit a compilation warning or deprecation notice when > parsing files mentioning that hash comments will be removed in a future > major release. Do this only for the first comment. > 2 - allow it silently (possibly an unnecessary option to provide) > > Then, this could be gradually strictened > > - Forbid option 2 in php 8.x > - change the default ini setting value to 0 in 8.x or 9.0 > - Add a configuration setting in php 8.x or 9.x to always disable hash > comments > - Remove support > > > Correct me if I'm wrong, but the shebang goes before the PHP opening > > tag > special case. > > Yes, shebang can only be parsed on the first line of a script - before > ` > Thanks, > - Tyson > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > --0000000000002aa8c505ae09230f--