Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59500 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78273 invoked from network); 9 Apr 2012 11:29:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2012 11:29:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=tom@punkave.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tom@punkave.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain punkave.com designates 209.85.213.170 as permitted sender) X-PHP-List-Original-Sender: tom@punkave.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:35737] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/84-56433-808C28F4 for ; Mon, 09 Apr 2012 07:29:13 -0400 Received: by yenl5 with SMTP id l5so2007105yen.29 for ; Mon, 09 Apr 2012 04:29:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding:x-gm-message-state; bh=3Wc4KFoyHwy5oE+RNidXhy4gQmmLDkApt+BbEEHP97I=; b=YIXtr1Xo84mveQ20fxs1OKBxCe2BqK+SY/SrcMvxfSH0uzhG181jxuODe53n5sYf+C 28GUjHkon7ysahwg9+TFeQ4mnjV7i1b4RyRzvi1I0p9uQ6BCDA7KutI3NXzqWLoTMGOb Fi9mYz1lOKqCd2QxNViE+SPf0FpjLwv2A6DSAdK3EaDDOplLn6DetbMRsCktkM+MyGz0 eNHYoWOe/Sv3eVrqJZ/CufccDPYT829c81Ndq8NpSBvYZeSsrM89GdNM7sElFlxN/+P0 xrQtV4zbqrV7MPr2jMowYK7FYzUl672ufVP0WU1TKJpvKnuuSqZA2Lf323EtctXT0B6A GLFw== MIME-Version: 1.0 Received: by 10.236.175.164 with SMTP id z24mr5599365yhl.101.1333970950122; Mon, 09 Apr 2012 04:29:10 -0700 (PDT) Received: by 10.100.35.16 with HTTP; Mon, 9 Apr 2012 04:29:09 -0700 (PDT) In-Reply-To: References: Date: Mon, 9 Apr 2012 07:29:09 -0400 Message-ID: To: PHP Internals Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQmR0kAvtIlYXllDw9mT4HA3S8nwn/kLlzYuMoaQHW/sKl1yXxOLjL1fP4PmZ0OAZrtNZjVZ Subject: Re: RFC: source files without opening tag From: tom@punkave.com (Tom Boutell) I would like to clarify what this RFC actually says. Let's try to keep this thread to the pros and cons of this specific proposal. The following new keyword would be introduced: require_path This keyword has two parameters of which the second is optional. The first parameter is the path (filename or URL) to be required, and behaves exactly as the sole parameter of the require keyword behaves. The second parameter is an associative array. If this second parameter is absent, require_path behaves exactly like requi= re. If the second parameter is present, the following keys may optionally be present in the array, with the following effects: If 'once' is present and true, the specified path is loaded no more than once, exactly like require_once. If 'warn' is present and true, a loading or compilation error results in E_WARNING (per the current behavior of the include keyword). If warn is absent or false, a loading or compilation error results in E_COMPILE_ERROR (per the current behavior of the require keyword). If 'code' is present and true, the parser begins reading the file as if a true, 'once' =3D> true); // Loads a file starting out in "PHP mode" so the opening true); In addition, a convention (not a requirement checked by the code) would be encouraged: PHP source code files without an initial