Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Perl/CGI Vs PHP Vs ASP

by Jaap (Curate)
on May 21, 2005 at 10:32 UTC ( [id://459227]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl/CGI Vs PHP Vs ASP
in thread Perl/CGI Vs PHP Vs ASP

Juerd++

I normally don't like the VI vs. emacs, Windows vs. Linux, Perl vs. PHP discussions, but for this article i'll make an exception.
Let us just not forget that PHP is very popular and 80% of it users really don't care about these shortcomings because it is just very easy to use.

In all fairness, the author could also have made some points where PHP is better than Perl.

Replies are listed 'Best First'.
Re^3: Perl/CGI Vs PHP Vs ASP
by Juerd (Abbot) on May 21, 2005 at 18:16 UTC

    In all fairness, the author could also have made some points where PHP is better than Perl.

    There isn't a single thing about the PHP programming language that is better than in Perl. Yes, some things are different, like PHP 5's new OO system, but that doesn't automatically mean it is better.

    The things in which PHP excels all have to do with its use as a templating-like language, integrated in Apache. And those are things that Perl doesn't do AT ALL, so a comparison would be weird already. There is no popular PHP-like Apache integration that uses Perl. mod_perl is far too powerful and dangerous to let loose on bulk hosting servers, but PHP lacks the power to configure Apache. mod_php and mod_perl do very different things, while PHP and Perl are both programming languages. A comparison showing which of the Apache modules is better would be wrong.

    The author would like to learn where you think PHP is better than Perl, though. And he accepts well written patches to the document in question.

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

      I think it is easier to start scripting in PHP than it is in Perl. If you are a complete n00b, you don't know where to find this "Perl interpreter" that you have to put on the first line after a cryptic "#!". If your provider has set up PHP for you, you can rename a .html file to .php and you have your first working php script (well... in a sense that is).

      Also, in PHP if i want to create in image, i can do that out-of-the-box. No modules to find, download, make, make test, make install, import. It just works. I remember when i wanted to work with images in Perl i was totally intimidated by the amount of choice i had. Not to mention that i had never heard of "make".

      So what everybody already knows about PHP (its easy of use) is a forte. It is also probably why so many people use PHP.

        If you are a complete n00b, you don't know where to find this "Perl interpreter" that you have to put on the first line after a cryptic "#!".

        The shebang is optional, and generally unix specific. Unix users already know how it works, Windows users don't have to even care about it.

        If your provider has set up PHP for you, you can rename a .html file to .php and you have your first working php script (well... in a sense that is).

        That's *mod_php* in Apache that does this and has absolutely nothing to do with PHP's programming language. In exactly the same way, a server COULD be set up to handle .pl files (or .plp) using a mod_perl handler.

        Also, in PHP if i want to create in image, i can do that out-of-the-box. No modules to find, download, make, make test, make install, import. It just works.

        This is a matter of how the distribution is formed. This is different, but neither is better. I, for one, hate PHP's crammed together packaging of everything there is, because it means I have to upgrade PHP every time an important bug is fixed in one of its standard extensions.

        I remember when i wanted to work with images in Perl i was totally intimidated by the amount of choice i had.

        Choice is tough. If you can't handle this, you should simply not be programming at all, regardless of language. Programming is continuously making choices, at several levels. If you can manage it, then you will learn and benefit from it in more ways than you can think of at the time of your first module choice. Again, this has little to do with the programming *language*.

        So what everybody already knows about PHP (its easy of use) is a forte. It is also probably why so many people use PHP.

        It is at the same time the reason why many professionals avoid PHP like the Plague. Ease of use is nice, very nice even, but it should never get in the way of a professional. This is a recurring topic in the perl6-language mailinglist. PHP is a tool meant for and made by beginning programmers. It's a pity that most of them will never use their full brain capacity with it.

        Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://459227]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-03-19 02:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found