Recursive PHP tag resolution

From: Date: Sat, 06 Oct 2001 07:22:01 +0000
Subject: Recursive PHP tag resolution
Groups: php.general 
Request: Send a blank email to php-general+get-70206@lists.php.net to get a copy of this message
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: <?php phpinfo(); echo "<?php phpinfo();?>" ?> If RTR worked in PHP, this code would generate a page of two successive PHPINFO displays, but in reality it doesn't. Is there a technique for doing RTR in PHP, and if not, has the issue been considered and discussed? My searches for mention of this topic have all been unsuccessful. If anyone is interested in hearing more about the benefits, I'd be happy to start a thread in this or another group. Incidentally, if there's a better group for this post, I'd appreciate being told what it is. Thank you.

« previous php.general (#70206) next »