At 09:42 24.11.2002, Adam said:
--------------------[snip]--------------------
>I have always had the opinion that the more comments you put into php
>scripts, the slower they will run because there is more data to be read...
>Can someone tell me if there is any truth in this or whether commenting has
>absolutely 'no' impact on the performance of a script?
--------------------[snip]-------------------- 

As PHP is an interpreter it needs to scan every line and every token of
code as it runs it. Thus said, of course using comments takes more time to
execute than having no comments.

I have no profiling yet how much having comments or blank lines would
actually effect execution times, but I doubt it would be really an issue
since PHP, once a comment start is encountered, doesn't parse the text but
just scans for the end-comment tag.


-- 
   >O     Ernest E. Vogelsinger
   (\)    ICQ #13394035
    ^     http://www.vogelsinger.at/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to