Frequent Mode Switching
| From: | Derrick Fogle | Date: | Tue, 05 Aug 2003 21:13:48 +0000 |
| Subject: | Frequent Mode Switching | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-158351@lists.php.net to get a copy of this message | ||
Thoughts on frequent switching in and out of PHP mode:
<? switch in, do some code
?>Switch out, static HTML
<? switch in, do more code
?>Switch out, more static HTML
I've found that I prefer programming this way, for the most part, putting most of the heavy PHP programming at the top, and then using static HTML interspersed mostly with quick <?= $variable ?> statements for what users see.
I'm sure there's more than one viewpoint out there, so I'd like to hear a couple of them. Is this frequent mode switching good, bad, or indifferent? Is there a point at which the mode switching starts to seriously degrade performance and reliability?
-Derrick