Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

php vs. perl

by NodeReaper (Curate)
on Feb 26, 2002 at 04:32 UTC ( [id://147475]=perlquestion: print w/replies, xml ) Need Help??

NodeReaper has asked for the wisdom of the Perl Monks concerning the following question:

Replies are listed 'Best First'.
Re: php vs. perl
by maverick (Curate) on Feb 26, 2002 at 05:15 UTC
    Once upon a time, I heard someone very knowledgable in a variety of languages refere to PHP as 'training wheels without the bicycle'. Next time I see this monk in the 'Other Users' box, I'll ask if I can credit him with the quote.

    From what exposure to PHP I've had, it seems to be pretty much a 'made in taiwan' version of Perl. The first version of PHP was actually written in Perl and was intended to be a 'simplified' version of Perl.

    Update: The quote is from merlyn. blakem pointed out that it's also here, in a thread about PHP vs Perl.

    /\/\averick
    perl -l -e "eval pack('h*','072796e6470272f2c5f2c5166756279636b672');"

Re: php vs. perl
by Malach (Scribe) on Feb 26, 2002 at 08:24 UTC

    I'd recommend starting on perl. It gives you more scope, more room to grow, and a much better set of resources for Doing Stuff Right (like perlmonks, and the O'Reilly collection of books on perl, and perldoc to name just three). PHP doesn't come close, unfortunately, there's a lot less around. Perl will get you into better habits (than PHP)if you help it to do so... (use strict; and use warnings; are your friends. I also use diagnostics; while developing).

    In terms of use, I follow a fairly simple rule. If it displays to the web, and I can do so, I use php. For everything else (that I do), I use perl.

    I find that I can write webstuff faster in PHP than I can in perl (this may be more of a comment on my ability than on perls suitability for task). PHP is limited (realistically) to web scripting (although you can use it for other things). Perl is a language for handling text (which means it also does web stuff very well). To my mind, the limited functionality of PHP is one of its strengths.

    Perl, of course, has strengths too. In my opinion, modules are one of the most important. PHP apparently has PEAR which does something similar - I'm not familiar enough to comment there... however I seriously doubt that it comes close to duplicating the sheer breadth of resource provided by CPAN.

    Perhaps if you could briefly describe the intended uses of what you're planning on learning, people could provide better/more focused comment?

    Malach
    So, this baby seal walks into a club.....

Re: php vs. perl
by screamingeagle (Curate) on Feb 26, 2002 at 04:53 UTC

      I disagree. The article is simplistic to the extent of being wrong or misleading in numerous places. Stating that Perl "extended the use of awk" is fine, but Perl also extended C, sed, and various other languages which Larry appreciated. Perl doesn't have to be an interpreted language - use mod_perl.

      The author neglects to mention templating systems, CPAN, or anything else of any technical substance other than how to read from STDIN, dedicating more space to telling us what the current versions of Perl and PHP are.

      zdog judges perl vs. php is a much better place to start researching the relative merits of Perl and PHP.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 15:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found