Closed Thread
Results 1 to 3 of 3

Thread: PHP or Perl? Need extra arguments

  1. #1
    Member muchio is an unknown quantity at this point
    Join Date
    Dec 2000
    Location
    Lithuania
    Posts
    30

    Question

    Hi,

    I know that this question appears in almost every programmer's - beginner's head and usually it has no reasonable answer. But, in generaly, what are the main advantages and disadvantages of perl and php scripts? Is it true that php has been initially built with Apache? Is it true that php runs much faster? And so on. I would like to hear every opinion also with technical details. Thanx in advancce (and excuse my spelling, I'm very bad in English

    Semper Fidelis

  2. #2
    Junior Member Devine Kos is an unknown quantity at this point
    Join Date
    Dec 2000
    Posts
    27
    Well I am by far a geek when it comes to programming languages but I will give it a shot.

    Perl/Cgi
    ---------

    Advantages:

    Simple to program
    (if you are advanced in html learining perl should be easy)
    More and more free host offer it as part of your account
    Many scripts are free
    Does not require special databases in order to run
    (i.e. mostly uses flat text files to store data)
    Fairly widespread in terms of use.

    Disadvantges:

    Same script might not run on different servers
    Requires special permissions and paths (in most cases)
    Has to be run from a special directory on your server
    (in most cases)
    Requires additonal programs (i.e. SSI) in order to call it
    from a standard html page.
    Not many free host offer the additonal programs
    Can be a resource hog
    Can be hard to debug

    PHP
    ---------

    Advantages:

    Fast
    same script works on most (if not all) systems
    not a resource hog (most of the time)
    can be run from any directory on your site
    most scripts are free (open source)
    Fairly easy to learn
    (I would suggest starting with perl then moving on to php)
    Often requires less code writing then other languages

    Disadvantages:

    Alot of scripts require a database in order to run
    Not many free host offer it as part of your account
    Can be unstable at times
    (especially when working with databases)
    Not so widespread as other programming languages (yet)
    Can be hard to debug


    Well there is my take on things hope it helps and good luck.

  3. #3
    Senior Member jvv is an unknown quantity at this point
    Join Date
    Oct 2000
    Location
    Antwerp, Belgium.
    Posts
    191
    First off there is speed... PHP is ALOT faster than perl.
    Yes, I keep hearing perl_mod would be at least as fast as php, but I still have to encounter the first host running perl that way)

    Personally I find PHP easier than Perl, and in PHP you can do more with less code.
    Perl tends to be a resource hog while php is alot less (php4 solves the memory problems people sometimes complained about of php3)

    PHP has built in database support, with just a few lines the world of SQL databases is available to you, couldn't be easier, try doing that with perl.

    I agree that PHP is not as widely available as perl, altho it's growing exponentially and becomming available on more and more hosts every day.

    For both languages scripts are available freely all over the web, and altho alot of PHP scripts require you to have access to an SQL database, there are also plenty that support flat file databases.

    On the matter of debugging I totally disagree... PHP tells you on which line it encountered an error and the type of error... pretty easy to locate the error I would say.
    "Don't go knocking on death's door, ring the doorbell and run away, that really makes Death angry"

Closed Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts