note 49741 deleted from tutorial.useful by philip

From: Date: Fri, 04 Mar 2005 19:08:23 +0000
Subject: note 49741 deleted from tutorial.useful by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-85944@lists.php.net to get a copy of this message
Note Submitter: killroy (my name at gmail) ---- I was writing my own script interpretter some years ago, and still run all my scripts through it. It actually uccurred to me that the script/html mixing is the same as thinging of "?>" as the BEGINNING of a quoted string, like "echo('" and as "<?php" as the end of a quoted string "');". So, add an implied ?> at the start of the script file and a <?php at the end, and then replace all "?>" with "echo('" and all "<?php" with "');". Of course you need a multiline string that doesn't terminate on quote characters ;). But basically this small internal step before interpretting the script torns the "mixed" file into a simple, regular program. This is basically what happens in the interpretation stage inside php. Or at least it does in my own language.

« previous php.notes (#85944) next »