Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50979 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20206 invoked from network); 9 Dec 2010 20:53:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2010 20:53:22 -0000 Authentication-Results: pb1.pair.com header.from=dmgx.michael@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=dmgx.michael@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: dmgx.michael@gmail.com X-Host-Fingerprint: 74.125.82.170 mail-wy0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:60634] helo=mail-wy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 64/42-07280-0C1410D4 for ; Thu, 09 Dec 2010 15:53:21 -0500 Received: by wyb39 with SMTP id 39so2740082wyb.29 for ; Thu, 09 Dec 2010 12:53:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=7L4bQc62TRrSMLG65t0becasaevUcsfcvYF6SVVVV0Q=; b=X0AcVe1oxpws9BzMiriFrazdyl6wmSG2XjYwahzHTb1FE1sthw4XfNB5OeeSBExbus VWoMOwOLOUouLmnQsJpsCh5xXFbBTzTcAm4ODcScVXFro+CJAZJoZjQ38yYp/kXLZzJ0 20G9g7fjHrJUL4guaetyQlde6w6ujKr+2bokA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ryusUewiN5ZTmcplD6gSOtVViv0jN5bFrEda1VHoHo10Jlgu5fejvv7E/x+v+ptHIe LuDcqsel4uAfmvTWcBErGudAg8ghbHxcSZgSH8CyvSF0RRqJmpbZMy4OnaLYhr7YzGWr pExX3hJREWCJ/rI/gc3bZcwa4kf+ItO/CHqyw= MIME-Version: 1.0 Received: by 10.216.173.82 with SMTP id u60mr2051220wel.0.1291927997723; Thu, 09 Dec 2010 12:53:17 -0800 (PST) Received: by 10.216.45.148 with HTTP; Thu, 9 Dec 2010 12:53:17 -0800 (PST) Date: Thu, 9 Dec 2010 15:53:17 -0500 Message-ID: To: PHP Internals List Content-Type: multipart/alternative; boundary=0016367fae6f614a0e0497006d20 Subject: PHP Dev RFC Selecting Namespaces and Tag styles at include time. From: dmgx.michael@gmail.com (Michael Morris) --0016367fae6f614a0e0497006d20 Content-Type: text/plain; charset=ISO-8859-1 Been pointed this way by some folks that this is the place to set suggestions on changes to the functions or language. I have two at the moment, and that is to the including functions (include, require, include_once, require_once). They need to be considered separately as they address two different problems. Tag Selection at include. First is the problem of short tags and they aren't being widely used because of the problems they cause for XML files. Why not allow the tag type to be chosen at file include? This should bypass the objections seen in http://wiki.php.net/rfc/shortags The parameter would be set by a constant. Val Constant Effect 0 PHP_TAGS_INI Use the ini setting. Default. 1 PHP_TAGS_STANDARD Use standard PHP tags. 2 PHP_TAGS_SHORT Use PHP short tags. 3 PHP_TAGS_NONE No tags allowed in file, parse as PHP. 4 PHP_TAGS_SCRIPT Script tags 5 PHP_TAGS_ASP ASP style tags <% %> PHP_TAGS_NONE is suggested as a possible bonus mode this approach allows that wouldn't be feasible otherwise. In this mode the engine treats the whole file as PHP and doesn't allow mode switching. This might allow the engine to parse the file faster. Importantly it would allow framework designers to enforce that certain files not have HTML in them - such as a database class, or a custom child class. Admittedly it doesn't stop echo'ing the html, but it drives home the point to all but the densest that perhaps this isn't the place to be printing/echoing. It's use would encounter the problem of current IDE tools assuming that a PHP file will always have a starting