Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106223 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 67717 invoked from network); 16 Jul 2019 21:17:54 -0000 Received: from unknown (HELO mail-lj1-f174.google.com) (209.85.208.174) by pb1.pair.com with SMTP; 16 Jul 2019 21:17:54 -0000 Received: by mail-lj1-f174.google.com with SMTP id v24so21001574ljg.13 for ; Tue, 16 Jul 2019 11:39:21 -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=P7W7z3C2be463ovlis2wAdfjnTv8ClQRnY3EY2W2bV8=; b=oOZxRaF0TrlkvYzdxbpVORvmCg0330oAJzUeh62s2gJD2l/1eB1/y5NiAc/vHtNqOo 5eeLtdqAPVwpydbaZbmiwMRD6rBRJ4di2rSZlLzc2xHCyF6rcIJWpMRr38InBoxFTmnG J42RZOOJMNAvs66HjbR1jFvA+c+tPlJAADkwCByuua+s6WTl+P+gy33we0ChCjQH+cwh Aqn8wiPEZwJTuRk36nJuep895slWDP9wwxLC90RHk4d/Li0Omzf1GDJYB8OWGkVaKz6t olEgaSKb0506kFoWAf8eHFFcUGo1/jNkelvV5DTxMwPoMf2Y23tMmuGb0/czT8KC9Lmk kNdw== 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=P7W7z3C2be463ovlis2wAdfjnTv8ClQRnY3EY2W2bV8=; b=UUjd5vgiUdI0K3DmRDLpEFuClhEswWoFEd41lPe80MbSoFopdCF0wWGfTdP4bfC/nl gPa8uqJW9vkCGQLK9CP9JCq5zCYXzufEwZObb/hc3aNMh8KIO/4ijmA3agTzHb1WB7PQ a3HXyeL7kAsYQMvzgR0cqkGGahV3Hfqbt0LDKqx/1XZBjDevpJYqbRSLwxr8thxtTpDz iSpDgoBG7G29vg+yai5t/ICzehfT+sNoDFgnuvB223b/SNGK/+kUmBR5tE2KBZBovQyF rU4PR8qA3tBcZVGokzZUypHGB8jYD1O8MoBXnn8Cx7WSHAoVbUk0g1nEK4hQgJLAgX72 RYCA== X-Gm-Message-State: APjAAAV2eShKU3LgavIew7GNKOJKrZZhYcaaWjbzXl4hPHhMI+3sxsDA Oy7Mxko5Pg957tub2yirTScnl0PnzxuxEVnemLE= X-Google-Smtp-Source: APXvYqzzgX7a01GPY3z6owotXG58zFN5b/YGP3xPiHa0leuYJOEVIpkc5eh2hoii+WRHVntxfPV8X6g4g8ch96/m1nI= X-Received: by 2002:a2e:8583:: with SMTP id b3mr18564173lji.171.1563302360835; Tue, 16 Jul 2019 11:39:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 16 Jul 2019 20:39:03 +0200 Message-ID: To: Bishop Bettini Cc: Arnold Daniels , PHP internals Content-Type: multipart/alternative; boundary="000000000000e4ee4e058dd0b137" Subject: Re: [PHP-DEV] Stop replacing dots with underscores in query, post and cookie parameters for PHP 8? From: nikita.ppv@gmail.com (Nikita Popov) --000000000000e4ee4e058dd0b137 Content-Type: text/plain; charset="UTF-8" On Tue, Jul 16, 2019 at 2:34 PM Bishop Bettini wrote: > On Tue, Jul 16, 2019 at 3:51 AM Nikita Popov wrote: > > > On Tue, Jul 16, 2019 at 3:40 AM Arnold Daniels < > > arnold.adaniels.nl@gmail.com> > > wrote: > > > > > Hi, > > > > > > PHP replaces dots with underscores for $_GET, $_POST and $_COOKIE. This > > > behavior once made sense because of Register globals. The explanation > in > > > the manual also still implies that query and post parameters are > > converted > > > to variables (see > > > > > > https://php.net/manual/en/language.variables.external.php#language.variables.external.dot-in-names > > ). > > > Register globals has been removed since 5.4.0 and thus this behavior > > serves > > > little purpose. > > > > > > I think it would be good to remove the conversion in PHP 8, as it's a > > > general cause of confusion and annoyance for anyone who comes across > it. > > > > > > Is there a good reason to keep this behavior in PHP 8? > > > > > > > This has been discussed a few times already, and I think that everyone > > agrees that this behavior should go, but not necessarily on the migration > > path. There is an RFC here: > > https://wiki.php.net/rfc/on_demand_name_mangling > > I think that the latest version of that RFC, that basically proposes to > > drop the behavior and tell people to use a polyfill is fine. > > > > I've readied the proposal for formal discussion. As proposed: > > - PHP 8.0 will no longer mangle variable names in any super-global. > - The changelog will recommend auditing super-global access for mangled > names, and replacing with the actual variable name. > - No INI settings will engage the behavior. > - No warnings or notices will be emitted. > - A polyfill will be made available to emulate that original behavior. > - Applications requiring name mangling shall invoke the polyfill during > bootstrap phase. > > https://wiki.php.net/rfc/on_demand_name_mangling Can you please start a new [RFC] thread for this? Nikita --000000000000e4ee4e058dd0b137--