Jump to content


starting and stopping PHP several times

php efficiency

  • Please log in to reply
1 reply to this topic

#1 MFA


    Advanced Member

  • Members
  • PipPipPip
  • 31 posts

Posted 31 March 2013 - 08:35 PM


I am wondering whether starting (<?php) and stopping (?>) PHP several times throughout a script has an affect on the speed of which it is processed. Sometimes I have a few lines of HTML in between sections of PHP language. Would it more efficient if I just echo'd this HTML section (in PHP) or does it not make a difference?

Edited by MFA, 31 March 2013 - 08:36 PM.

#2 trq


    Advanced Member

  • Administrators
  • 31,036 posts
  • LocationSydney, Australia.

Posted 31 March 2013 - 09:43 PM

This kind of micro optimisation is not worth considering. If your code is clearer breaking in and out of php tags, do so.

http://thorpesystems.com | http://proemframework.org | http://github.com/trq

SmtpCatcher - A very simple mock sendmail useful for testing PHP mail scripts.
OPM - My Linux package manager.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime