Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP code comments parse speed

Does anyone have a solid benchmark about the speed of parsing PHP code comments? Meaning, will excessive comments increase the time to process a PHP page?

like image 459
leepowers Avatar asked Mar 17 '10 00:03

leepowers


2 Answers

Useless optimization

b. strip off comments to speed up code

Not a solid benchmark, but this particular post has great PHP performance tips and some mythbusters.

like image 102
N 1.1 Avatar answered Sep 27 '22 20:09

N 1.1


Comments are not parsed in PHP but rather ignored and PHP skips over them, in excess they only add to your diskspace. Otherwise, comments do not lag down processing at all.

like image 36
JonnyLitt Avatar answered Sep 27 '22 21:09

JonnyLitt