php compare with CGI

Posted on 2006-04-15
Last Modified: 2008-03-10
if thing in term of server resorce does php use resorce form server less than CGI
Question by:teera
    LVL 15

    Assisted Solution

    You can't compare the two. PHP is a language. CGI is just a standard of communication between the Web Server and an external program (which can actually be written in PHP as well). Resource usage depends totally on your particular setup and what your PHP code or CGI programs are doing.
    LVL 15

    Accepted Solution

    If you're talking about Perl (commonly reffered to as CGI, even though the actual language is called Perl, and it processes CGI):

    PHP was designed specifically for scripting web pages, which means it has many built-in functions to allow you to quickly and easily perform common tasks (tasks that would require you to write more lines of custom code in Perl).  PHP is generally considered to be a faster language, though I've heard arguments that Perl can function just as quickly if done correctly.  For most web purposes, PHP is a better choice in my opinion.  I also feel that it's better with accepting form data and working with databases (MySQL in particular, which is the most popular one to use with PHP).

    With that said, both languages have about the same learning curve, and they can both do a lot of things.  PHP seems to be more widely used and supported these days, and I would imagine that it will keep getting better as newer versions are released.
    LVL 15

    Assisted Solution

    Of course, you can read arguments for both languages all day long:

    However, I think PHP has been pulling ahead quite a bit over the last few years when it comes to picking a language for web development.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
    This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
    The viewer will learn how to dynamically set the form action using jQuery.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now