Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51107 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80970 invoked from network); 21 Dec 2010 16:43:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Dec 2010 16:43:56 -0000 Authentication-Results: pb1.pair.com header.from=dmgx.michael@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=dmgx.michael@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 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: 74.125.82.54 mail-ww0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:52687] helo=mail-ww0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 86/79-33535-B49D01D4 for ; Tue, 21 Dec 2010 11:43:55 -0500 Received: by wwb31 with SMTP id 31so5136134wwb.11 for ; Tue, 21 Dec 2010 08:43:52 -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=phlUWzhwJTIndKrUCb7XdwlB7MNzk1h8oySoF31FFJA=; b=Of7zvVl8nr2Hr2pHGMbfOIaU9RR034cf5WORdTNTDRlDXVxu/cGy/00P94fRv5JGsP gG79A/5zir/M+DpISQyjqY0MPs9e7z8Zz2y+iIXb/h3SSRREOWZKAFOwE43l5CbKxzdD e1DWzIz9u48ky2nc0LqE3faYHNuYjVY7vdACc= 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=Dp8vmAohv2UcFGTtLoRYgTNuMRlZ3aFb0GzsZbkazlbtU86LIq4gP5QQeTQ6fU2lqH OdF5n3EPdkeEsAr1zYO44FJpcV2KTVga/Use1Zj9SbHlRpHnq+payBQ1TBCqGBqSGlut 3ATFRe+oJuPgeY6YiWVI8T2dwYVMRW0El2ER8= MIME-Version: 1.0 Received: by 10.216.3.130 with SMTP id 2mr689696weh.100.1292949832641; Tue, 21 Dec 2010 08:43:52 -0800 (PST) Received: by 10.216.45.148 with HTTP; Tue, 21 Dec 2010 08:43:52 -0800 (PST) In-Reply-To: References: Date: Tue, 21 Dec 2010 11:43:52 -0500 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=0016365ee0e07cac740497ee57da Subject: Re: [PHP-DEV] RFC: Selecting Namespaces and Tag styles at include time. ( was Re: PHP Dev RFC Selecting Namespaces and Tag styles at include time.) From: dmgx.michael@gmail.com (Michael Morris) --0016365ee0e07cac740497ee57da Content-Type: text/plain; charset=ISO-8859-1 That would make for an easier situation. If we don't worry about legacy for a moment that would give us this cleaner bitfield. Bit 0 -- Standard tags toggle 1 -- Short tags toggle 2 -- ASP tags toggle 3 -- Script tags toggle 4 -- Short echo toggle. For backwards compat ship with bits 0 and 3 set on. The existing short tags mode is bits 1 and 4 on. If all the bits are turned off then we have the PHP_TAGS_NONE setting. In that mode the engine must assume the whole file is going to be PHP code since there are no tags to look for. I honestly like this best of what has been suggested so far, BUT the need to adjust settings after upgrade is a major concern. Admins who never enabled asp or short tags to begin with wouldn't notice the settings going away, and those that have I would expect to be savvy enough to transfer the setting change themselves. Another possbility is to have PHP set tag_style according to whether it sees short_open_tags and asp_tags in the ini file. If either of them are on, and tag_style wasn't explicitly set, then php will set tag style to the values it must have to mimic the intent of the setting. If tag_style is explicitly set then it wins out - but a deprecated notice gets thrown to alert the user that they have both tag_style set and short_open_tags and/or asp_tags set on. If an htaccess or httpd.conf directive explicitly calls for short_tags or asp_tags after tag_style was explicitly set a warning of some sort is thrown informing the user that they must switch that declaration to one compatible with the php.ini file. Ditto for sets occurring at runtime with one exception - if the user specifies tag style from the include or require statement itself this shouldn't raise any error. (That there's no comment on the adding of the second param to those function as of yet concerns me a little - it is somewhat key to the proposal.) Anyway, the trickiest part of this is balancing the past with the future. --0016365ee0e07cac740497ee57da--