I like to see html highlighting, so I prefer first method, but for some small snippets I also use echo

Ernest E Vogelsinger wrote:

As Maxim pointed out a couple of days ago, this is just a matter of
nanosecs, it shouldn't be really noticeable from performance.

The fastest was to display non-PHP output is to escape from PHP and enter
plain HTML, like
$a = 'World';
<H1>Hello <?=$a?>!</h1>

This is quite ugly to read and write, and it prohibits to separate content
from output. So the next fast way to output would be
echo '<H1>Hello World!</h1>';
Note the single quotes - they are (_very_slightly_) faster than double quotes.

If you need to display variables you must revert to
echo "<H1>Hello $a!</H1>";
to parse the string (note the double quotes here).

I would always prefer to have to buy a faster server and use the second or
third method than having to escape from PHP for any output, for what it's

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to