Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99061 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 74829 invoked from network); 16 May 2017 19:28:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 May 2017 19:28:30 -0000 Authentication-Results: pb1.pair.com header.from=php@golemon.com; sender-id=softfail Authentication-Results: pb1.pair.com smtp.mail=php@golemon.com; spf=softfail; sender-id=softfail Received-SPF: softfail (pb1.pair.com: domain golemon.com does not designate 209.85.128.179 as permitted sender) X-PHP-List-Original-Sender: php@golemon.com X-Host-Fingerprint: 209.85.128.179 mail-wr0-f179.google.com Received: from [209.85.128.179] ([209.85.128.179:33018] helo=mail-wr0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BA/D4-15531-9D25B195 for ; Tue, 16 May 2017 15:28:27 -0400 Received: by mail-wr0-f179.google.com with SMTP id w50so82662886wrc.0 for ; Tue, 16 May 2017 12:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=golemon-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=0d1GYB2ATnEIFeLcH6LpmQd+okFxZzR5eS1+R3Dgf6g=; b=SbcvKLND6fxo+h+GLw0YPpU4pX+SkYHW0PqVQOw9RcsiZ0giuIt9UOUZr1Klyn11A5 D5yw/tS79dcGpzS3Ubdt9lBYA/NPY5oM6kM9Z8WkE3SaDyEDzTTtHSPlHnWaYdgDu9Fx ro2+BFvQ2ylChc0QvR99J0GIXn9E8v69S4kMLwbj3WcdLS17feE8fovh9xWz/wzepUSw 3He16r617Fw1ScmCh9/5hC0xFdUW0uoN/U8D2UiLL40rD69iayE5SwmWTPifFT7cb0oS KezhG72bX6HrSMeLIsYG9Y+rrXxmOftEX5oV5SWuyia/6P0Y5A+BbB8Gc0gj+IhJxuHb Gq4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=0d1GYB2ATnEIFeLcH6LpmQd+okFxZzR5eS1+R3Dgf6g=; b=JZn0sdzFCU3mdjeWxdS+NAWpOYhmsttSqA+Q64jL/G33D0wexcP0eGRz5DWzrZ4NL7 rYRFtGDj+51L+kjfEhshjSjYAZcuLi7dm/peQTrjxe0W1005pud99F/qO/CCOaYnp4uc 2iBGd0M0E6FG9vD41Sb60/p8vcoW0qND36LxistbNyg2J0B9AKGtJmNWgm55Lj/PFSWW CW8KVTBU7Kvddu/qT8D2SzfM5rzaSH3E+rZn+4wL2Ue/RKFjPj5sY54z8yQVCc1teMRB 4pSMyDPfeAetOWzRCFNj3zuLNxUa1S9E87CFtpWD76wE2YU44AuU85cT1k3rCQQ04IKT 2o+Q== X-Gm-Message-State: AODbwcACJ03Saypja5yZf/YwnI2pQs0w7Qb5d+DAMACTrc9V7yqDe+CZ cBPYgF7TI9uWZtLd7WEtsvZlmROqZ4zm X-Received: by 10.223.179.199 with SMTP id x7mr9854025wrd.72.1494962902328; Tue, 16 May 2017 12:28:22 -0700 (PDT) MIME-Version: 1.0 Sender: php@golemon.com Received: by 10.223.157.38 with HTTP; Tue, 16 May 2017 12:28:21 -0700 (PDT) X-Originating-IP: [73.9.224.155] In-Reply-To: References: Date: Tue, 16 May 2017 14:28:21 -0500 X-Google-Sender-Auth: T-10prFs7ywRCXaCy7uWiesmD7w Message-ID: To: Andrey Andreev Cc: "internals@lists.php.net" Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [Discussion] Dots and spaces in GPC variable names From: pollita@php.net (Sara Golemon) On Tue, May 2, 2017 at 5:56 AM, Andrey Andreev wrote: > With parse_str() usage without a second parameter being deprecated, I > was looking to possibly drop the behavior where it replaces spaces and > dots with underscores in the result array, and ... As it often turns > out - it's not that simple, because it re-uses the code that handles > GPC vars. > > I didn't even know this mangling happened with GPC vars. I can only > assume that's legacy from the the register_global days, as I certainly > don't see a reason for it now. Am I missing something? > > And more importantly, can we change that? It's a significant BC break, > yes, but the current behavior is horribly broken IMO. > BC breaking the default handling of GPCSE vars aside, I'd be 100% in favor of either adding a flag param to parse_str() for this. parse_str($_SERVER['QUERY_STRING'], $_GET, PARSE_STR_NOMANGLE); -Sara ((Or add a new function which doesn't mangle and returns by value rather than by ref because *ugh* at that by-ref semantic))