I have been using PHP for quite a number of years now and have become a bit proficient in using it. I am trying to write the cleanest, most efficient code.
Q. Is it faster / more efficient for php to process pages that contain many single references / calls to php or one single reference using echo commands to output static html??
Example: I have a .php page that has a little over 1,000 lines of code to handle many different variables and checks. Would it be more efficient to call <?php and use echo commands for all the static code which is mostly unique and cannot be put into functions, or to have standard html with 200+ calls to <?php xxxx ?> embedded withing the html code??
Thank you.
-Al
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have been using PHP for quite a number of years now and have become a bit proficient in using it. I am trying to write the cleanest, most efficient code.
Q. Is it faster / more efficient for php to process pages that contain many single references / calls to php or one single reference using echo commands to output static html??
Example: I have a .php page that has a little over 1,000 lines of code to handle many different variables and checks. Would it be more efficient to call <?php and use echo commands for all the static code which is mostly unique and cannot be put into functions, or to have standard html with 200+ calls to <?php xxxx ?> embedded withing the html code??
Thank you.
-Al