PHP

Moderators: None (Apply to moderate this forum)
Number of threads: 1848
Number of posts: 5016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
cgi and php Posted by The Xception on 13 Apr 2002 at 5:04 AM
php and cgi do the same thing but php is faster than cgi or the other way around i don't know?? But the main question is why is one faster than the other if they do the same??
Report
Re: cgi and php Posted by katarski on 3 Jun 2002 at 7:05 PM
: php and cgi do the same thing but php is faster than cgi or the other way around i don't know?? But the main question is why is one faster than the other if they do the same??
:
A CGI application would be faster because it is compiled code, whereas PHP code needs to be run through a parser and interpreted line by line. Also, because a CGI program can be written in any language, and so can be optimised.

Cheers,

James.
Report
Re: cgi and php Posted by Mark Strijbos on 12 Aug 2002 at 5:58 AM
: A CGI application would be faster because it is compiled code,
: whereas PHP code needs to be run through a parser and interpreted
: line by line. Also, because a CGI program can be written in any
: language, and so can be optimised.

wrong! as of version 4 a PHP script is compiled by the Zend engine before it is executed, resulting in faster execution times for all but the most trivial scripts.

And while CGI programs in theory can indeed be written in any language methinks about 90% is written using Perl & shell scripting. In other words: many CGI's are not compiled at all but run in scripted form, and are interpreted line by line.





Report
Re: cgi and php Posted by katarski on 12 Aug 2002 at 5:24 PM
: : A CGI application would be faster because it is compiled code,
: : whereas PHP code needs to be run through a parser and interpreted
: : line by line. Also, because a CGI program can be written in any
: : language, and so can be optimised.
:
: wrong! as of version 4 a PHP script is compiled by the Zend engine before it is executed, resulting in faster execution times for all but the most trivial scripts.
:
: And while CGI programs in theory can indeed be written in any language methinks about 90% is written using Perl & shell scripting. In other words: many CGI's are not compiled at all but run in scripted form, and are interpreted line by line.


That's nice. Try getting out more...




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.