PHP Newbie

They have: 32 posts

Joined: Feb 1999

Hey guys,

It's been a while but I've got a question for you programming gurus. I'm just now trying to learn PHP (wish me luck!), I've written a few scripts, but nothing worthwhile. Anyway, my question is this: I know that PHP isn't as hard on your server resources as CGI, but why is this so?

If I'm understanding things right, they're both generated on the fly using the local on-server interpreters. So wouldn't they both be equally hard on resources? Unless the PHP interpreter itself is lighter then Perl. And what is the resource usage of static HTML pages compared to PHP?

If anyone can point me to the right direction on anything related to PHP I would appreciate it. Thanks!

Ryan Kuhle
Template Bargains: Professional website templates for under $20!

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

Have you been to http://php.net? That's the best PHP information site I've found.

HTML requires no server-side parsing. So there is practically no load on the server... just what is required to fetch the file, and send it to the user. PHP and CGI do require server-side parsing.

I'm no expert when it comes to designing interpreters, but my guess is that the developers of PHP took a look at existing interpreters, and learned from there benifits and flaws to come up with one that performs the best.

Mark Hensler
If there is no answer on Google, then there is no question.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.