Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51100 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92960 invoked from network); 20 Dec 2010 21:52:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Dec 2010 21:52:12 -0000 Authentication-Results: pb1.pair.com header.from=ssufficool@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=ssufficool@gmail.com; spf=pass; sender-id=pass 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: ssufficool@gmail.com X-Host-Fingerprint: 209.85.215.182 mail-ey0-f182.google.com Received: from [209.85.215.182] ([209.85.215.182:65339] helo=mail-ey0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/94-59680-B00DF0D4 for ; Mon, 20 Dec 2010 16:52:12 -0500 Received: by eyf6 with SMTP id 6so1765073eyf.13 for ; Mon, 20 Dec 2010 13:52: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:cc:content-type :content-transfer-encoding; bh=q5dWV1HvxrA/2z34n5l7RH+QQqcU1w6l2tUO0ju/KjI=; b=tC6IJUyWQBNBz0W+YCZEOd+dxYMgCpGTl8tsyw8l85Ynk1ehba4Rie0tv4K6U8yUCh UPljkcd15JmR5HiS1EYr8FgTOF7Os9Hhhf4hKVNNmmb1pal0/Yv+onGtXKnzDQACMy62 ShkkWC9IycNS4zGk6L1lUI+d/NfTtj75UCBYg= 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 :cc:content-type:content-transfer-encoding; b=J8GaC4FzgvA9ZfWvQmAshLLU1I6FaCDDIr0q1aN9G9jQ3L80ehP5UCYPs3cHwV1qIs IPslSnjMMXESNqX7dUdRNbtdwL5uDmTNrnl8fBZ2dFN8wvUjkoIVeZXDpmmg6ZsKWEnb 4WW49Vpju4wqkHQ9gnJykbkM/axPGi+P6cCMk= MIME-Version: 1.0 Received: by 10.213.106.19 with SMTP id v19mr5312999ebo.78.1292881927813; Mon, 20 Dec 2010 13:52:07 -0800 (PST) Received: by 10.213.26.69 with HTTP; Mon, 20 Dec 2010 13:52:07 -0800 (PST) In-Reply-To: References: Date: Mon, 20 Dec 2010 13:52:07 -0800 Message-ID: To: Michael Morris Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: ssufficool@gmail.com (Stanley Sufficool) On Mon, Dec 20, 2010 at 7:02 AM, Michael Morris wr= ote: > I'm not opposed to using a bitfield, but it's going to be tricky to do > because there are two settings that want to be 0. =A0Backwards compatibil= ity > needs to have the 0 setting both for the function calls and the ini setti= ng. > However, the no tags mode also wants to be a 0 logically. > > The best I can come up with to mitigate this problem is this. > > Bit 1 would toggle these two modes. > 0 - Backwards compatibility - use the short_open_tags and asp_tag setting= s - > and whatever tags are specified by the higher bits of this setting. Zero is zero, there can be no "whatever tags are specified by the higher bits of this setting." because that would be other than zero. > 1 - No tags expect as specified in this setting. > > Then the other bits would be more simple on/off toggles. > 2 - normal tags ( ) > 4 - short tags () > 8 - asp ( <% %> ) > 16 - Shorthand echo ( 32 - Script tags ( ) > > And so on. =A0Under this schema the PHP_SHORT_TAGS constant would be > equivalent to 20 since that is what is expected by most people who use > 'short tags' > > > On Sun, Dec 19, 2010 at 11:22 AM, Matthew Weier O'Phinney < > weierophinney@php.net> wrote: > >> On 2010-12-17, Michael Morris wrote: >> > --0016e6daa93aab9e2004979f11fa >> > Content-Type: text/plain; charset=3DISO-8859-1 >> > >> > I've been giving some thought to the implication of my off the cuff >> > addition of PHP_TAGS_NONE to the modes allowed and what should >> > logically go with that. If tag style can be declared in a function, it >> > should be possible set them in the configuration and at other places. >> > Currently tag style is spread over multiple settings in the >> > configuration - I know of two: >> > >> > asp_tags >> > short_open_tag >> > >> > This is problematic moving forward so I hereby suggest nipping further >> > proliferation in the bud and go to one configuration setting with this >> name: >> > >> > tag_style >> > >> > It's values, and their corresponding meaning: >> > >> > Val =A0Constant =A0 =A0 =A0 =A0 =A0 Effect >> > 0 =A0 =A0PHP_TAGS_LEGACY =A0 =A0Honor older ini tag settings such as a= sp_tags >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0or short_open_tag, = in all ways behave in a >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0a manner compliant = with the expectations of >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0any scripts that ar= e upgrading. >> > 1 =A0 =A0PHP_TAGS_NONE =A0 =A0 =A0No tags will be permitted in the fil= e. >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Interpreter expects= the whole file to be >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0PHP. >> > 2 =A0 =A0PHP_TAGS_STANDARD =A0Enable the classic tags we all = know >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0and love. >> > 3 =A0 =A0PHP_TAGS_SHORT =A0 =A0 Use PHP short tags and .= Unlike >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Legacy behavior wit= h short_open_tag set to >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0'on' this setting w= ill NOT let you use >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 alongside = the and >> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0tags. >> > 4 =A0 =A0PHP_TAGS_SCRIPT =A0 =A0Script tags