Hello,

"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote:

> 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.

That said, it's reasonable to think that

//
//  I
//  have
//  long
//  comments
//  that
//  extends
//  hundreds,
//  if not,
//  thousands
//  of lines.
//  Just kidding! :)
//

  would be faster (unnoticeable it may be) than

/* -------------------------------------------------------------

 I
 have
 long
 comments
 that
 extends
 hundreds,
 if not,
 thousands
 of lines.
 Just kidding! :)

------------------------------------------------------------- */

Anyway, it's *always* better to have comments than nothing at all...

- E

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

Reply via email to