depending on the requirements of your script, it is quicker to use <? echo
$var; ?> as required, this is because php essentially ignores all the html
tags untill a <? ... ?> is found for which php does it's stuff...
if you use
large echo "..."; statements here and there...
PHP has to go thru the contents of "..." and repace any variables it
however if you are echo'ing without variables always use '...' and not "..."
as the single quotes state that it's just text and so it does'nt need to
parse this just output it. You can do 'some text'.$aVariable.' more text';
which will be quicker that "some text $aVariable more text"; to process...
As I said at the start, it very much depends on what is required for a
Also, it is better to choose a style and stick to it! And only break your
own style when the need calls for it.
Brian M McGarvie ([EMAIL PROTECTED][EMAIL PROTECTED])
IT/Web Apps Specialist
www.anypurposeloans.co.uk -- www.mcgarvie.net
"Tony Crockford" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm sure this is an RTFM, but I'm not sure where I should be looking.
> is it quicker for PHP to execute <? echo $var ?> in blocks of html or to
> echo all of the html and only have one <? and ?>
> I'm using a PHP script to write a lot of html files to hard disk and the
> script execution time is climbing beyond the maximum set in PHP.ini
> (I've changed the setting, but...)
> I'm looking to shave milliseconds of each execution, any ideas, pointers
> or tutorials you could point me to.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php