Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50976 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9635 invoked from network); 9 Dec 2010 19:58:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2010 19:58:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmgx.michael@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmgx.michael@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.182 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: dmgx.michael@gmail.com X-Host-Fingerprint: 209.85.215.182 mail-ey0-f182.google.com Received: from [209.85.215.182] ([209.85.215.182:33189] helo=mail-ey0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/60-07280-4D4310D4 for ; Thu, 09 Dec 2010 14:58:17 -0500 Received: by eyf6 with SMTP id 6so2241924eyf.13 for ; Thu, 09 Dec 2010 11:58:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=n5zUHQzJglQCfygw+lIoPY/t9uLtNctM/KLD3LRCNMI=; b=Y4IhzpKHdT3zc2RWwyZKEiBQ13qU2jG9LhnPGrCzJJ7Vsnj+QENcuERVDoCymEmJHR uo3M/B+hjQNWWw+zWYQBS3AByMH7aJ5CmKgvj+XpSLAfJytP2dvQtPSm+g7+44AeQ5cK JpNEvaiVvQfNGwrubrvlDa01J6kifHgmq3q60= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=TxZ8Hw9+gnaVfxO5yyWc4p5AQRbaF9BFeLZechakZAGB4rzjlyZodbjW4Mxp+yBn6z NblD9izeZfjhC3m+7tU/84taIugpc8Ab/MCupxRgYBqjfKjcGR5WXxg9E1dgZXz1S0Qz A6pQDhpnahifm70UjVd1DMsbJwcWtaGl4RJqA= MIME-Version: 1.0 Received: by 10.216.172.15 with SMTP id s15mr1004545wel.70.1291924688364; Thu, 09 Dec 2010 11:58:08 -0800 (PST) Received: by 10.216.45.148 with HTTP; Thu, 9 Dec 2010 11:58:08 -0800 (PST) In-Reply-To: References: <4D00ABFE.5070403@hristov.com> Date: Thu, 9 Dec 2010 14:58:08 -0500 Message-ID: To: PHP Internals List Content-Type: multipart/alternative; boundary=0016e65a08602067f20496ffa8fa Subject: Re: [PHP-DEV] Deprecating "global" + $GLOBALS, making $_REQUEST, $_GET, $_POST read-only From: dmgx.michael@gmail.com (Michael Morris) --0016e65a08602067f20496ffa8fa Content-Type: text/plain; charset=ISO-8859-1 On removing globals / $GLOBALS, erm, -1 to that. Just too much legacy code needs this to work as is. On making $_POST, $_REQUEST, $_GET et al read only, again -1 for the same reason. However, I understand the sentiment and it brings up this idea... What about a new superglobal, $_INPUT, that is read only. Further its topmost structure could go something like this -- $_INPUT = array ( 'POST' => array(), // The post request vars 'COOKIE' => array(), // Cookies 'GET' => array(), // Get request vars 'HEADERS' => array(), // Inbound HTTP headers, the stuff that right now is misleadingly in $_SERVER['HTTP...'] 'FILES' => array(), // Uploaded file information. ); Since $_INPUT would be read only from inception nothing can break because it can't be written to. At an INI level the option to turn off the legacy superglobals it replaces might be added, but that's a separate issue. --0016e65a08602067f20496ffa8fa--