Re: Recursive PHP tag resolution

From: Date: Sat, 06 Oct 2001 13:56:54 +0000
Subject: Re: Recursive PHP tag resolution
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-70218@lists.php.net to get a copy of this message
Thank you, Rasmus and Christian. The combination of ob_start() and eval() is in the direction of what I'm talking about, but for accomplishing RTR it seems needlessly complicated. I'm having a devil of a time understanding when and what characters you need to escape in eval() to get the evaluation to happen properly. Are there any other techniques out there for recursive PHP tag resolution? John Gunther Bucks vs Bytes Inc Christian Reiniger wrote:
On Saturday 06 October 2001 09:34, Rasmus Lerdorf wrote:
Isn't that just an eval() ? On Sat, 6 Oct 2001, John Gunther (Bucks vs Bytes Inc) wrote:
I've used recursive text expansion to great advantage in many contexts over the years, and I'd like to ask if there's any way to make this happen in PHP. Recursive token resolution (RTR) can greatly simplify programming logic. With RTR, text generated by, for example, a PHP echo statement, would in turn be processed by PHP as though it were there from the outset. If that newly generated text contained PHP tags and code, their evaluation would affect the resulting page. Here's a trivial example:
I think he rather means something like automatic output buffering. John: http://php.net/ob_start


« previous php.general (#70218) next »