Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59994 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71965 invoked from network); 16 Apr 2012 09:31:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Apr 2012 09:31:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=arvids.godjuks@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=arvids.godjuks@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.170 as permitted sender) X-PHP-List-Original-Sender: arvids.godjuks@gmail.com X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:44365] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B6/11-05733-9F6EB8F4 for ; Mon, 16 Apr 2012 05:31:38 -0400 Received: by iaeh11 with SMTP id h11so8473279iae.29 for ; Mon, 16 Apr 2012 02:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=y0wsUVYCnXVZB0znpup+ba7uXzFGw47Shok7Wi3L9aU=; b=Fjm5WHMGC3kcMyzySs8LtYME9sqp6ElL48Z07NL+ZX0n0ci7fi4tLUhiV0RjACl5/1 HAK7vcyuYMUitvNeLITxpYBuIV4mTaDVhXHqbFiHEQdJAj62E7cEDliEt42rDZIkP+Pi Uj6thcJKGV+twIxXEIahVuPilXSZUkdDZx4W80n5K2StgTBkoaJMOOcM1dTLZyMHy1HX rsWQ8VKorIdKrv43PgajSe8I9xXVT7Fru9Z9BcvwwNPwgZ+hCnq+Laz9iXiQSRioZR6B L7x284uzgDPt3GXVlz0fTK87XVcpfm3q/odGT1S7fkCkeUYedA6AFyCjCk1sivtWI8iK YKfg== Received: by 10.42.139.9 with SMTP id e9mr6322936icu.43.1334568694619; Mon, 16 Apr 2012 02:31:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.134.233 with HTTP; Mon, 16 Apr 2012 02:31:14 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 Apr 2012 12:31:14 +0300 Message-ID: To: Ferenc Kovacs Cc: Kris Craig , Yasuo Ohgaki , Pierre Joye , PHP internals , Tom Boutell , Moriyoshi Koizumi Content-Type: multipart/alternative; boundary=90e6ba613862f89e2304bdc87ca2 Subject: Re: [PHP-DEV] Re: Go for votes for the open tag-less PHP files From: arvids.godjuks@gmail.com (Arvids Godjuks) --90e6ba613862f89e2304bdc87ca2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 16 =D0=B0=D0=BF=D1=80=D0=B5=D0=BB=D1=8F 2012 =D0=B3. 11:24 =D0=BF=D0=BE=D0= =BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Ferenc Kovacs =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > > > On Mon, Apr 16, 2012 at 9:46 AM, Arvids Godjuks wrote: > >> What happened with the proposal/RFC for expanding include/require with >> additional optional second param to allow for developers to define in >> place >> if he want's a pure PHP file to be included or a template file with dire= ct >> HTML output? >> I like that proposal and take it over any other, because it gives >> developer >> a choice. > > > there is a valid issue which was discussed on irc yesterday: > because include/require is a language construct, not a method, one is > allowed, even advised to write the include/require calls without putting > out the parentheses. > if we introduce additional arguments for include/require, the following > code will break: > echo include 'foo.bar', 'baz'; > as currently it was interpreted as > echo include('foo.bar'), 'baz'; > ofc. we could make that the additional params to include, require would > only used, if the parentheses are uses, but that would make require/inclu= de > inconsistent with every other language construct, where the parentheses i= s > optional. > so we either accept this BC, or not pursue this option, but go with the > new functions/opcodes like include_code/require_code or similar. > > -- > Ferenc Kov=C3=A1cs > @Tyr43l - http://tyrael.hu > That's sad really, to be honest. I wonder if people even use this: > echo include 'foo.bar', 'baz'; > as currently it was interpreted as > echo include('foo.bar'), 'baz'; I even didn't know it worked that way and if I saw code like this before today I would consider it an error (I would discover that it actually works, but I definitively would rewrite that part in two lines as distinct operators them with ; instead of , between them) Maybe it's not that big deal and a BC break would not impact things a lot. What do you think? --90e6ba613862f89e2304bdc87ca2--