Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54535 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35025 invoked from network); 12 Aug 2011 13:12:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Aug 2011 13:12:38 -0000 Authentication-Results: pb1.pair.com header.from=mats.lindh@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mats.lindh@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.42 as permitted sender) X-PHP-List-Original-Sender: mats.lindh@gmail.com X-Host-Fingerprint: 74.125.83.42 mail-gw0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:64038] helo=mail-gw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/FF-40016-5C6254E4 for ; Fri, 12 Aug 2011 09:12:37 -0400 Received: by gwb17 with SMTP id 17so2208797gwb.29 for ; Fri, 12 Aug 2011 06:12:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=XZi9I4Z2E/B3FUeMcvFsjdgWFTKNermRG4r/aGLfW/s=; b=SGbBcPnslqgkveecW3V30S9xklnIpqkTC0BykxfeSC5FY2b6I2Xgh85BsknSprTKR4 VYHEx8pvnhIGFS7Sblkr39HFZCZ03hefK6502iMF1gmUyDYo95CMx4Mj68SuriPCIk9v xjmNzGQkKckZKnIWc0m6RcMg6JaQkK0FGVlTo= MIME-Version: 1.0 Received: by 10.236.116.41 with SMTP id f29mr2866282yhh.135.1313154754416; Fri, 12 Aug 2011 06:12:34 -0700 (PDT) Received: by 10.236.105.163 with HTTP; Fri, 12 Aug 2011 06:12:34 -0700 (PDT) In-Reply-To: References: Date: Fri, 12 Aug 2011 15:12:34 +0200 Message-ID: To: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] behavior of translating dot in the query variable name into underscore character From: mats.lindh@gmail.com (Mats Lindh) On Fri, Aug 12, 2011 at 1:23 PM, Kalle Sommer Nielsen wrote: >> For BC reasons there is no way we can simply remove it. Old code might >> rely on it without relying on register_globals. > Although we could assign both, but I guess that would eat more memory > that it might actually benefit. Would it be possible to assign it as a reference and change the reference on the first write (similar to copy-on-write)? In that case I'd suggest doing something similar to: * Assign all variables to their provided name * Assign a reference as the "cleaned" version of their name if there isn't already an existing version of the clean name in the map Quite a few services use "." in their query string variables (such as Solr, for one), and the mangling of the query string names requires you to parse the query string yourself if you want to write a front end service accepting the same kind of API. -- Mats Lindh