Dave Goodchild wrote:
Hi all, this may seem like a silly question, but I am creating a library of
html form element generation function, for example a textarea fucntion that
takes rows and cols as parameters, a function that generates a day, month
and year select box, etc. My question is - is it significantly to switch off
the parser and emit raw html than calling a function? If it is faster to
just allow the server to send the html I will not bother.


I'm not quite sure I understand your question. Are you asking if it's faster to parse and process a php script vs. a page of raw HTML?

In that case, OF COURSE SERVING A RAW HTML FILE IS FASTER!!!
Does the server have to do *anything* with the contents of the HMTL file? no
Does the server have to do *anything* with the contents of the PHP file? yes! of course! it needs to parse and process it BEFORE it can actually server the RESULT of that script.

So, if possible, stick to raw HTML files.
- tul

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

Reply via email to