Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59541 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70915 invoked from network); 9 Apr 2012 20:06:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2012 20:06:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=luke@cywh.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=luke@cywh.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cywh.com from 209.85.212.42 cause and error) X-PHP-List-Original-Sender: luke@cywh.com X-Host-Fingerprint: 209.85.212.42 mail-vb0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:45796] helo=mail-vb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CE/E7-34074-931438F4 for ; Mon, 09 Apr 2012 16:06:17 -0400 Received: by vbjk13 with SMTP id k13so2955742vbj.29 for ; Mon, 09 Apr 2012 13:06:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=references:from:in-reply-to:mime-version:date:message-id:subject:to :cc:content-type:content-transfer-encoding:x-gm-message-state; bh=3A5mKXazaprS+nWVsSIPuBZpSOZc7522stVRArfsgTk=; b=Mb5rJ56dHTHE6lq/Nu4jsk0CsUnQxCFvZ3WpduJ/bPVad/OHfMhacycz2pTz0s2yUC bh3UAmqhrkDQupDbmAc9vZYvWNxjtF57efuG1OZDEAZhyKf594Qw53NRUxfwX1VNcEin ibd15t4viypRvz9m9wY0R2sT7jBkLxdMbKjKcS1noO3PRqZ9eXmRqg8zwq27gqg6Hk8h 9f8YrfAVIDF6dRg9Pe7Q1siypQwYaoHS3/XCbD+DGaC8wFfsNOitlU32j3BwytUaGZiI S6u4oRd9pkPLfz84d4D3TchRZ/gviAigdl3qmeBbD+D+ADz9X/a0Y1aZ+7DUFF8Vu8+m Y7og== Received: by 10.52.178.225 with SMTP id db1mr3338104vdc.26.1334001974812; Mon, 09 Apr 2012 13:06:14 -0700 (PDT) References: <-5877502932356715576@unknownmsgid> <-3647345967307864634@unknownmsgid> <4F831FAE.2030208@ralphschindler.com> <4F8336CA.6030800@gmail.com> In-Reply-To: <4F8336CA.6030800@gmail.com> Mime-Version: 1.0 (1.0) Date: Mon, 9 Apr 2012 13:06:12 -0700 Message-ID: <-3946312978847986790@unknownmsgid> To: =?ISO-8859-1?Q?=C1ngel_Gonz=E1lez?= Cc: Chris Stockton , PHP Developers Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkazNwCfLkTJ8acsRWBODGYZwdm7+tj47MF8C32FmIRZ9vfjoEIzTnCfG3q1MvbS7SjEnlD Subject: Re: [PHP-DEV] RFC: source files without opening tag From: luke@cywh.com (Luke Scott) On Apr 9, 2012, at 12:16 PM, "=C1ngel Gonz=E1lez" wrote= : > On 09/04/12 20:23, Chris Stockton wrote: >> Hello, >> Although I am not very interested in this feature, if it is >> implemented I like the idea of flags instead of introducing new >> keywords. Maintaining backwards compatibility would be great >> considering the benefit to the feature to be completely honest (and in >> disagreement to many people, but I do understand the reasoning for >> everyone's interest in it) is extremely minor in my eyes. >> >> In addition I would suggest maybe using PHP_INCLUDE_* as a place for >> these constants to live. >> >> -Chris > That would still be a parse error. > Either > include "file.php", 5; > or > include ("file.php", 42); > > Fails with a parse error about unexpected ',' > > On the other hand, a new keyword can be written in a backwards > compatible way by making it look like a function call in a non-taken bran= ch: The keyword "abstract" would cause a parse error for older versions of PHP. Backwards compatibility is having existing code work with the current versions. To make new code compatible with older versions of PHP you simply don't use the keyword/constant. > > *if ( version_compare(PHP_VERSION*, '5.5', '<') ) > include_once $file; > else > require_code($file, array( 'once'=3D>true, 'warn' =3D> 'ignore' ) ); I'm fairly certain that wouldn't work either. Require and friends are constructs, not functions. Luke > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >