Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59514 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15966 invoked from network); 9 Apr 2012 16:13:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2012 16:13:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=cogo@starzinger.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=cogo@starzinger.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain starzinger.net from 80.202.8.16 cause and error) X-PHP-List-Original-Sender: cogo@starzinger.net X-Host-Fingerprint: 80.202.8.16 eterpe-smout.broadpark.no Solaris 10 (beta) Received: from [80.202.8.16] ([80.202.8.16:62272] helo=eterpe-smout.broadpark.no) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/50-14133-9BA038F4 for ; Mon, 09 Apr 2012 12:13:46 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from terra-smin.broadpark.no ([80.202.8.13]) by eterpe-smout.broadpark.no (Sun Java(tm) System Messaging Server 7u3-15.01 64bit (built Feb 12 2010)) with ESMTP id <0M27007I8ZQUV330@eterpe-smout.broadpark.no> for internals@lists.php.net; Mon, 09 Apr 2012 18:13:42 +0200 (CEST) Received: from [192.168.1.156] ([80.203.237.142]) by terra-smin.broadpark.no (Sun Java(tm) System Messaging Server 7u3-15.01 64bit (built Feb 12 2010)) with ESMTP id <0M27002NKZQUZO70@terra-smin.broadpark.no> for internals@lists.php.net; Mon, 09 Apr 2012 18:13:42 +0200 (CEST) Message-ID: <4F830AB2.4050209@starzinger.net> Date: Mon, 09 Apr 2012 18:13:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 To: internals@lists.php.net References: In-reply-to: Subject: Re: [PHP-DEV] Object oriented page templates in PHP From: cogo@starzinger.net (Christer Edvartsen) On 04/09/2012 05:10 PM, Tom Boutell wrote: > What if PHP supported a short tag for calling a method of $this? > > Then one could write: > > > > And 'escape' could be upgraded and modified as needed in an object > oriented way without the need to type many times. You might be able to achieve this using the prep extension written by Andrei Zmievski: https://github.com/andreiz/prep/ A relevant example can be found here: https://github.com/andreiz/prep/tree/master/examples/array_literal where he introduces an alternative syntax to array(). -- Christer Edvartsen http://cogo.wordpress.com/ http://twitter.com/#!/cogocogo