Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36317 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97473 invoked from network); 22 Mar 2008 12:10:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Mar 2008 12:10:09 -0000 Authentication-Results: pb1.pair.com header.from=lars@strojny.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=lars@strojny.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain strojny.net designates 85.10.204.248 as permitted sender) X-PHP-List-Original-Sender: lars@strojny.net X-Host-Fingerprint: 85.10.204.248 milch.schokokeks.org Received: from [85.10.204.248] ([85.10.204.248:36081] helo=milch.schokokeks.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/80-28271-D17F4E74 for ; Sat, 22 Mar 2008 07:10:08 -0500 Received: from [192.168.0.9] (xdsl-87-79-224-33.netcologne.de [::ffff:87.79.224.33]) (AUTH: PLAIN lars@schokokeks.org, SSL: TLSv1/SSLv3,256bits,CAMELLIA256-SHA) by milch.schokokeks.org with esmtp; Sat, 22 Mar 2008 13:10:01 +0100 id 0000000000020002.0000000047E4F719.000062C2 To: Pierre Joye Cc: Ralph Schindler , Stanislav Malyshev , Hannes Magnusson , Marcus Boerger , PHP Internals In-Reply-To: References: <47E3F714.60302@zend.com> <883216194.20080321193140@marcus-boerger.de> <47E40848.1060103@zend.com> <7f3ed2c30803211412v299a0c36m86cabb27b26c232@mail.gmail.com> <47E42657.7010408@zend.com> <7f3ed2c30803211420s6cdd06bcy331880346fa68cb@mail.gmail.com> <47E4281C.80706@zend.com> <47E44A1A.2020703@smashlabs.com> Date: Sat, 22 Mar 2008 13:09:59 +0100 Message-ID: <1206187799.10080.26.camel@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=_milch.schokokeks.org-25282-1206187802-0001-2" X-Mailer: Evolution 2.22.0 Subject: Re: [PHP-DEV] short_open_tag From: lars@strojny.net (Lars Strojny) --=_milch.schokokeks.org-25282-1206187802-0001-2 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Ralph, Pierre, everybody, Am Samstag, den 22.03.2008, 01:23 +0100 schrieb Pierre Joye: > On Sat, Mar 22, 2008 at 12:51 AM, Ralph Schindler w= rote: > > > > > Take this file: > > > > > > > > > > > > > > > > > > > > > and run it through xmllint. That's exactly the point, thanks Ralph. It makes absolutely no sense validating XML documents containing PHP instructions *before* the instructions have been processed as the instructions may - obviously - change the state of the document (e.g. . So a much more sensible QA practice is to generate the process the template and validate it after processing (at least in the development stage). At this time, no matter which tags have been used, and only at this time, it is possible to determine whether a document can be counted valid or not. Example 1 (not valid before processing): "/> Example 2 (valid before processing but not after): ";?> Example 3 (valid before an after processing): I've picked three random use cases. Only one of them can be successfully validated before processing. Rasmus pointed it out before, people are using short tags, because they want to save keystrokes and increase readability. More verbose code (using temporary variables, etc. pp.) might be better in business logic but the quality of a template rises and sinks with the size of its instructions. This is why people do use Smarty ({foreach from=3D$array item=3Ditem} is shorter than