Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106215 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 27155 invoked from network); 16 Jul 2019 09:23:54 -0000 Received: from unknown (HELO mail-lf1-f66.google.com) (209.85.167.66) by pb1.pair.com with SMTP; 16 Jul 2019 09:23:54 -0000 Received: by mail-lf1-f66.google.com with SMTP id r15so7928006lfm.11 for ; Mon, 15 Jul 2019 23:45:14 -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=wuZbi1GID1IhnRkVnCYE4hkhpJiTiaBVfb9l0zYnUnw=; b=Yzy/GxPHfGTQKgTO54sPtCH3w7TSGt47cP+F5ZeVEtN6Bs54p0LFzoarwpi03+XCl5 XGu1Sbqo08BiYKZgRYo+2wePyc9hxMTgzlgDrCHi8BooBvira6MoRq1fHH1RNsTRCjjE HDx5FW4R8ETqIr7eYXVm0pNEmIGpjzo0sN4zNbwUB4YXmtH6WYggiMXLGK+jB2KYWYJC B6v3H3ulm7FSMcDMgIk906oerKkwkd/H7+PkJbkMs65RoXiNO+UM6Xjio7hdSQowVDRY bIyLdUk9GzI8VL7htnO/2O1w2bMCGZW1dgTZcxsgSEmtReoIjFIXrFCooXC98ssQEG14 S7Wg== 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=wuZbi1GID1IhnRkVnCYE4hkhpJiTiaBVfb9l0zYnUnw=; b=NXE2nOhgKh5pTyrXAlAE/1SA8EwJMLT+J8VC4vKnvURNbW1jV4pPX5AJZRC5dE0AqG mRlD+7wkE1yWGurZPwC6+xSaalWWhkxHBGdD1AFtKqDd0w8vesIJ5I3pi1jc4kpNndGh OU299sc2vFLm8WZPNs2QLnN8Swtuz6jd3v8RUHzzoax9ZGsjWXEGmIOmjX7np4DS8vpK nQHTks50VkHRiDkRgWRnJLnRfFyJWzUyB064yGShxUvk7N6FNtcLDSulwuWl8wpgcN7m X1zS5q1sg8l+dJU0ipO8OnEe3R+IlVzlvPGbqb9Iv10zuyrVIF9HgAFNQ6IZy/uoHGtx 5TiQ== X-Gm-Message-State: APjAAAWjufhsJH1YRq8joXFUiF4s/1T55Rgi2fGkbkdPeADAMe6eA0bb iGqJ6fWQRoGP3oqL0j/vyaSJY92rDx1F4j2ShQ== X-Google-Smtp-Source: APXvYqzJ5drHmHa9XczlVvi80UIn1oz2F924yw9/ZNoxy74ILCFLxIIs2vRPDTqD8f322Wfie1qLJNR9+GYOKRrwBN8= X-Received: by 2002:a05:6512:1da:: with SMTP id f26mr13512048lfp.129.1563259513791; Mon, 15 Jul 2019 23:45:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 16 Jul 2019 08:45:02 +0200 Message-ID: To: Sara Golemon Cc: Arnold Daniels , PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Stop replacing dots with underscores in query, post and cookie parameters for PHP 8? From: guilliam.xavier@gmail.com (Guilliam Xavier) On Tue, Jul 16, 2019 at 4:39 AM Sara Golemon wrote: > > On Mon, Jul 15, 2019 at 8:39 PM Arnold Daniels > wrote: > > 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? > > > IMO, we can safely kill this. If anyone needs this behavior preserved, it > can be mimicked with half a dozen lines of PHP, or heck we can include a > function to call. I will, however, be very surprised if anyone misses this > by now. > > -Sara Indeed, it seems that people are rather strugling to work around the current behavior (and have been for years)... Some examples: - https://bugs.php.net/bug.php?id=40000 - https://stackoverflow.com/questions/68651/get-php-to-stop-replacing-characters-in-get-or-post-arrays - https://github.com/symfony/symfony/issues/9009 - https://github.com/api-platform/core/issues/509 - https://github.com/api-platform/core/blob/v2.4.5/src/Util/RequestParser.php -- Guilliam Xavier