View Poll Results: Which is generally best?

30. You may not vote on this poll
  • PHP + mySQL

    22 73.33%
  • PERL + mySQL

    7 23.33%
  • PERL + flat file

    1 3.33%
Results 1 to 14 of 14

Thread: PHP vs. PERL

  1. #1
    Join Date
    Jul 2004

    PHP vs. PERL

    In terms of efficiency, which of the following is generally best:
    1. PHP with mySQL,
    2. PERL with mySQL, or
    3. PERL with flat file (plain-text) database?

  2. #2
    Join Date
    Aug 2002
    Hong Kong
    >>In terms of efficiency...

    your words make me very unclear of what you really mean, sorry man.

    if you talk about the efficiency in terms of valueable programmers time, php + mysql is probably more efficient

    Perl + mysql may not be so efficient for use in web development in terms of computational performance due to the nature of how perl (the compiler) works. but if it is mod_perl + mysql using DBI interface it for no doubt outperforms php + mysql

    Perl + plain text is good for counters . or some very experienced programmers who work out a way to utilize it, it is as good as your programming level

  3. #3
    Join Date
    Mar 2004
    Two things, it should be a checkbox not option buttons.. and you forgot to mention PHP+flat file..

    I love both PHP and PERL, they are almost identical but I use PHP more for its popularity..

    Testing 1.. Testing 1..2.. Testing 1..2..3...

  4. #4
    Join Date
    Dec 2003
    Well that depends on how you want to look at the languages? For example I think it is much easier to do simple PHP + MySQL for a website (functionality etc.) But on the server(meaning http request will not call the perl script) side perl + MySQL is my favorite. For example, I have spamassasian deliver spam to a folder outside pop boxes so the users won't have to mess with them. A perl script goes through each month and gathers data inputs it into a MySQL db and creates a graph to display on a web page.

    So from my experience:
    Perl = easy to crunch/manipulate data
    PHP = easy to display data and makes a simple website very easy to maintain.

    Overall if you write a perl script to create a php page... I actally think I've done that

    Whatever floats yer boat
    if($php !== $javascript){
    echo "Good it's not supposed to be";

  5. #5
    Join Date
    Apr 2003
    i think these guys have summed it up - its not sufficient to ask 'which is the best', you need to ask 'in situation xyz, which is the best' or similar. as a general rule from here - perl from *nix command line processing, php for web based programs/tools

  6. #6
    Join Date
    Feb 2005
    Hull, England
    I think that PHP has better support for MySQL, PHP and MySQL seem to share a special bond

  7. #7
    The performance depends on the way you execute the script not on the programming language. The CGI way is slow because each call to the script is the separate perl or php interpreter process. Usually the php is configured as Apache module and in order to run the script no new process needed.
    For example the php script can be configured to run as CGI. And perl script can be configured to run under mod_perl. It's perfectly possible that perl script will run faster that php one.

    The php is more popular because it's much easy to study it rather than perl where almost everything looks very cryptic (for novices).

    The perl got a better OOP support and that's why is more scalable. Although the newest PHP v5 also have a strong OOP support.

    I personally love perl because with perl I type less and get programs ready for tests quicker.
    But for big project (or call them middle sized) I choose php because I often benefit from large free codebase. Also I sometimes don't like to support my code and it's much easy to find someone who can support php code than perl. Also php script requires less experience at the install time. The client just upload the script to server and execute install.php
    With perl script I have to teach them how to correctly switch the ftp application to ASCII mode and set correct permissions with chmod.

  8. #8
    Join Date
    Nov 2002
    Do we need another one? Why not use search feature? It always turn out be a religious war. There is no point. Every language has it's cons and pros so pick up one that you can learn and start coding in it.
    Get help with your server optimization - A forum on server optimization...
    ExoPHPDesk - Powerful PHP HelpDesk

  9. #9
    Join Date
    Oct 2004
    This is sort of wrong comparison imho.
    PHP is for web scripting only. But with Perl you can actually build offline stand-alone applications.
    If you're gonna build only web pages, PHP/MySQL is way to go.
    Closed for winter...

  10. #10
    Well, with cli version of php you can do shell scripting. Also using Tk extension you can do even desktop apps.

  11. Im a PHP+MySQL person myself and hate coding in perl. be objective, I will have to admit that Perl is more efficient at crunching text. Its built that way. I wonder why a lot of server side scripts are written in Perl. Cpanel is basically perl and most of the server admin scripts are written in perl.
    What you can do with Cpanel ------------------> |||||
    What you can do with Cpanel XP+CpanelAPP -------> ||||||||||||||||||||||||||||||||||||||||

    Your competitors are cashing in with Cpanel XP & CpanelAPP, are you?

  12. #12
    Join Date
    Apr 2003
    Originally posted by
    Well, with cli version of php you can do shell scripting. Also using Tk extension you can do even desktop apps.
    sure, but why use clunky tools when there are more widespread/elegant solutions?

  13. #13
    Join Date
    Apr 2003
    Portland, OR, USA
    I would defantely have to vote PHP+MySQL as they are what i use all the time i havent really played arround with perl programming so i dont know much about it.

    - James

  14. #14
    PHP is nowadays far more used than Perl but Perl has its own good things... Like others have been saying, it's juster a matter of what do you want to do...

    If we are talking about a website with no backend external processes, I would go with PHP. Otherwise, ... well ... I would tri doing it using PHP also but some tasks are more optimized using Perl.


Posting Permissions

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