Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59773 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62670 invoked from network); 12 Apr 2012 01:52:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Apr 2012 01:52:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:44517] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FB/0D-23245-655368F4 for ; Wed, 11 Apr 2012 21:52:23 -0400 Received: by yenl5 with SMTP id l5so956592yen.29 for ; Wed, 11 Apr 2012 18:52:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=u2Q1TUmt8MoXBYbvJ7nfYUjZuX+65OjUmH84qveHexw=; b=IxugpAou6WLYubXHN1O5Ih9B5uswvYP19BuYbUiccf2XS/7daqf8h9NfKnEALzw9q4 goEdvfX0DbJiPCUzPwN91JhE70NCIHx9hNMhYDSxCpDIJO33qfI25u5GHw36Qm1DSWnJ WlB6DZ7qIQ2Ao0x0BILf41Zg1GKHXUPE6/YCKLf5zzNJRQSAs0etAITbtJ/HZ5PHQV9T Wz0cNKUHv8DINHL1GY9Ju6hBfftGY4ehvuDEu5qTIKYgwF7nd3tQUQzUUQGfv8WNTLjg cEPJchV/H8gaD0j8n271CcCOO2Iv8zAJf46UKxemldDD5mPdC8Sm9zWvkcNClgHNoZ6e 7X8w== Received: by 10.236.193.39 with SMTP id j27mr463238yhn.111.1334195540493; Wed, 11 Apr 2012 18:52:20 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.146.86.14 with HTTP; Wed, 11 Apr 2012 18:51:40 -0700 (PDT) In-Reply-To: <4F862AAC.90003@lerdorf.com> References: <4F850D06.10701@sugarcrm.com> <4F8515AF.8060706@sugarcrm.com> <4F851FE4.7000706@sugarcrm.com> <4F8539E0.1090701@sugarcrm.com> <4F859063.1010401@lerdorf.com> <4F862AAC.90003@lerdorf.com> Date: Thu, 12 Apr 2012 10:51:40 +0900 X-Google-Sender-Auth: N8rZQT40z1xE9_X5Cd347ulSXpA Message-ID: To: Rasmus Lerdorf Cc: Kris Craig , Chris Stockton , John Crenshaw , Stas Malyshev , "internals@lists.php.net" Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Re: Disabling PHP tags by php.ini and CLI options From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi, 2012/4/12 Rasmus Lerdorf : > On 04/11/2012 02:10 PM, Yasuo Ohgaki wrote: >> It's also very easy to write backward compatible code also. >> The 3 lines of changes to adopt this RFC do not bother >> old PHP. >> >> No compatibility issue for existing code >> Just 3 lines of change to adopt >> Full backward compatibility for OLD systems >> >> The only issue is NEW code may be disclosed by **OLD** >> systems. >> >> If you think it costs too much still, please let me know. > > Pretty much all of the code I have ever written would break. I use > PHP-based templating everywhere and include my templates with > include/require. How exactly can I fix this with 3 lines of code? > I guess you have been writing code for the best performance. I have these code also. For these codes, there are many places to change, so it can't be adopt template_mode=off easily. The best way would be defining your own include/require wrapped by ini_set('template_mode', 'on') and ini_set('template_mode', 'off'); Then replace include/require where it is needed. Users may stay template_mode=on. The best part of PHP is templating, so this switch should be in PHP forever. This switch is to enjoy best of both embedded and non-embedded language at the same time. PHP without template is not PHP. I would rather not to have new parameters nor special extensions for PHP only script. This RFC is the best I can think of now. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net