My question really is in regards to speed/optimization of the code rather than a style issue. (But style comments are wanted also
What is better in terms of optimization in these two different code blocks:
Code: Select all
<?php
if (1) {
echo "<H1>Hello World.</H1>";
}
?>Code: Select all
<?php
if (1) {
?>
<H1>Hello World.</H1>
<?php
}
?>Obviously if you have a lot of case 1 versus case 2 you actually spending more time processing function calls, but is there anywhere anyone knows of that documents this information? Anyone have any ideas?
Thanks for any help on this!
Matt