Possible Duplicate:
PHP: Opening/closing tags & performance?
this is probably a stupid question, but being extremely perfectionist i thought I’d ask just for curiosity:
Is there a perfomance issue if opening and closing the “php” tag to many times ?
I mean, is there a consequence performance speaking using this
<?php
$track_id = 418; //default
?>
<?php include('includes/popup_biography.php'); ?>
instead of this :
<?php
$track_id = 418; //default
include('includes/popup_biography.php');
?>
I don’t know of any performance issue. There might be a very minor performance issue due to the emission of what is between the two statements, but I think it would be unnoticeable.
However, you should not break out of php for a different reason: this emission prevents you from sending any other headers with your request. I think that breaking out of php to print is an antiquated notion and should be avoided entirely. If you are going to do it, reserve it for printing the results of your logic (all done long before any printing, probably in a different file).