Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27456 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29373 invoked by uid 1010); 15 Jan 2007 17:37:23 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29358 invoked from network); 15 Jan 2007 17:37:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2007 17:37:22 -0000 Authentication-Results: pb1.pair.com header.from=pollita@php.net; sender-id=unknown; domainkeys=good Authentication-Results: pb1.pair.com smtp.mail=pollita@php.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 140.211.166.39 cause and error) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pollita@php.net X-Host-Fingerprint: 140.211.166.39 osu1.php.net Linux 2.4/2.6 Received: from [140.211.166.39] ([140.211.166.39:57223] helo=osu1.php.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A3/E3-33655-2DBBBA54 for ; Mon, 15 Jan 2007 12:37:22 -0500 X-DomainKeys: Ecelerity dk_sign implementing draft-delany-domainkeys-base-01 DomainKey-Signature: q=dns; a=rsa-sha1; c=nofws; s=mx; d=php.net; h=From:Subject:To:Date; b=G8xf3hTMg2U82hh6YzfQcxNlLvJkKB2k5HFfR8HjHihGHVyH/euABk4KBlb5COj1 YWAdVuNLOU4psupoiz7v2qGXcboOxaKd9HRAenaRb354VErY0hzp3MzblJfvNGTi Authentication-Results: osu1.php.net smtp.user=pollita; auth=pass (LOGIN) X-Host-Fingerprint: 69.181.128.213 unknown Received: from [69.181.128.213] ([69.181.128.213:49304] helo=[192.168.1.100]) by osu1.php.net (ecelerity 2.1.1.11-rc1 r(13363/13364M)) with ESMTPSA (cipher=AES256-SHA) id E0/75-21910-B1CBBA54 for ; Mon, 15 Jan 2007 09:38:36 -0800 Message-ID: <45ABBBCF.8010600@php.net> Date: Mon, 15 Jan 2007 09:37:19 -0800 User-Agent: Thunderbird 1.5.0.9 (Macintosh/20061207) MIME-Version: 1.0 To: pierre.php@gmail.com CC: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Runtime JIT Proposals From: pollita@php.net (Sara Golemon) > As I told you, there was already a consensus on this solution, check > my initial proposal (solution #2): > > http://news.php.net/php.internals/26965 > No, that's a consensus on compile-time versus runtime. What I offered in my post was four variants of how runtime could be implemented. >> In response to the suggestion to just turn $_REQUEST (et.al.) into >> objects with overloaded array access, the big danger there is that the >> following behavior would change: > > It will bring a BC break as well or is_array($arrayaccessobject) will > have to return true and we have to be sure about its implementation > (like properties access not always working well). > Right, we all agree that approach won't work. >> Personally, I like Option 4, but then I like complexity. I can >> certainly see going for any of the others, but I want to go with >> something that the rest of the group can see being appropriately useful. > > I like my initial proposal. All it needs is an extra function and to > move the JIT management to runtime. The complexity is the same as what > we have now. > What if I want to inspect one particular element for encoding hints? /* Initially set encoding to ascii just for parsing 'ei' */ http_input_encoding('ascii'); if (!empty($_REQUEST['ei'])) { /* Request identified itself */ if (!http_input_encoding($_REQUEST['ei'])) { handle_bad_input_encoding(); } } else { /* Fallback on best-guess */ http_input_encoding_detect('UTF-8,ISO-8859-1'); } /* Work with the rest of $_REQUEST using the identified encoding */ -Sara