Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106229 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 67745 invoked from network); 18 Jul 2019 09:46:27 -0000 Received: from unknown (HELO mail-oi1-f171.google.com) (209.85.167.171) by pb1.pair.com with SMTP; 18 Jul 2019 09:46:27 -0000 Received: by mail-oi1-f171.google.com with SMTP id e189so20604719oib.11 for ; Thu, 18 Jul 2019 00:08:17 -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=B86zwLK2p8RwXDTtNarPESFnD19rWGYOqyfA8N4E/2E=; b=RtHhlIqH5jqkXRc9yzJc3XzcLfgeHuWSIcTgHV3aFjMZXu2KOJkluGWgfoAZFMQwoX wPvi8IIalOOQgKn2ez7VqU3uUWA0CXHHydMS+snnngPZJz+g/mimm/IuqMpKh4JaTXb+ s7rcdFKiig9weuYmHhWd4BYjCOJOQbJVX7ljrvr2tnsv/q/vIp6Fb5ayNYZFIrfyfMDA 5MaYThKAFoKlCZIfLkmucLXFbLUv26p+gr7lXn0yM1798GfIVNwmAjC6f3sSA2KCr04C 6/+MVVbb6H4jEPIPGLPLWgZf/bsOTXJ+Aigu7KMCRSoKSdhouUEA0Odmf9fduVhbzcWu Pyvg== 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=B86zwLK2p8RwXDTtNarPESFnD19rWGYOqyfA8N4E/2E=; b=E95FkXmuisX1WK9jG0HK2t8bim2vLIy6YwM8lv12wgbb6FzEIBOew+n3+G+N6T5LjM OV0rYifNYcM4BAnL6YZh7dGCPmpUlYfQCvRbcobH+F6N46rMetGBPsnL9OXghIfGW4ex Lonlv82Dh/gtlPMKpsShool3cuPxZjPjiT1fjAzO97YAvJR8WvfuSr45yCSNkybbpcvL JcMdVvXLOWIjj1wd2NlV+YTGgpGGgaKrj8BvJVZhmnHXHCjaBd5hKeOV4siDFXSs47zT kwiOjmPOiyqmQf4iSYsrf0QNV1N/T5rQSMO3dk/efuPn0P5ur9TSV5tumLar1O7YPrgC +UmQ== X-Gm-Message-State: APjAAAUDP/9+kk2k1zOiuFLrOKYinKR3CvHdBFgdWNYJMxk4q+eXtwCX jr3r6jXZaIhcCnN16oy0Da8hq7/uRssDadSxxw8= X-Google-Smtp-Source: APXvYqw/IWyhrJP0cQWJuPtasw/umqsQy7Pnex2r1CU2F3Z0HbkKzfhHzoS/rSACwzDDYuoPeaSlUx2w+7SwAnmaaDk= X-Received: by 2002:aca:c48b:: with SMTP id u133mr20064535oif.95.1563433697084; Thu, 18 Jul 2019 00:08:17 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 18 Jul 2019 09:08:05 +0200 Message-ID: To: Nikita Popov Cc: Arnold Daniels , PHP internals Content-Type: multipart/alternative; boundary="000000000000250b01058def46fa" Subject: Re: [PHP-DEV] Stop replacing dots with underscores in query, post and cookie parameters for PHP 8? From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000250b01058def46fa Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le mar. 16 juil. 2019 =C3=A0 09:51, Nikita Popov a = =C3=A9crit : > 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 i= n > > 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.variab= les.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. > The RFC doesn't tell about parse_str(), while this is the userland variant of this. I think it could be useful to make parse_str accept a third argument starting with PHP 7.4! That would allow userland code to opt-in for the new behavior asap, and would provide the core implementation for ppl that want to keep the current behavior for PHP8. Makes sense? Nicolas --000000000000250b01058def46fa--