View Full Version : anyone want to summarize?
Keiichi
11-11-2000, 02:59 PM
I have never used PHP before but had looked at scripts of it and it does look somewhat simpler than perl.
Would anyone here want to kinda say what make php such a good language?
Maverick
11-12-2000, 12:53 PM
You answered your own question. What makes PHP such a good language is that it's simpler than Perl. For many of us our websites are just a hobby, not a full-time occupation. Perl is pretty difficult to grasp for people that write code one day a month. PHP is simple enough that it gives us non-programmers a chance to get some things done simply where using Perl might be over our heads.
jimbo
11-12-2000, 05:40 PM
What Maverick said, but I want to add that PHP can be used for many of the same functions as perl.[nbsp][nbsp]So don't get the impression that PHP is an inferior language because of what Maverick said, even though it was by all means correct.[nbsp][nbsp]I use PHP mainly for quick database queries that I want to include on my pages.[nbsp][nbsp]I call my ad banners via PHP, and I use PHP to include menus, headers, etc.[nbsp][nbsp]I also use it for articles on my site; for publishing them, having a printable version, and for "send this article to a friend" type of things.[nbsp][nbsp]These are all the types of things that Maverick brought up.
But PHP can be used for extensive programs, such as vBulletin (http://www.vbulletin.com/).[nbsp][nbsp]I've also seen some other very slick applications coded in PHP.
I know the strengths of perl, but I find PHP to be more suited for my needs.[nbsp][nbsp]PHP is a very versatile (for lack of a better word) programming language.[nbsp][nbsp]It is very similar to ASP (a.k.a: the devil ;) ).
Hope this helps :)
-jim
Keiichi
11-13-2000, 01:42 AM
oh. lol
PaulKroll
11-14-2000, 01:05 AM
OK, I'll play the devil's advocate: PHP isn't versatile. Perl is versatile: it can do many different things pretty well. PHP is specific. It's a web scripting language; it has an extended C syntax, many web-related functions and connects to databases. PHP gets a lot of its power out of being so specifically targeted.[nbsp][nbsp]Perl is complex, partially because it's able to do a considerable range of tasks, and partially because Perl is a Very Different Language.
You can use PHP (compiled for CGI) as a shell/scripting language, but that's not what it does well.[nbsp][nbsp]Neither of these critters is particularly great for doing large scale coding. (Though both have been, let's say, pushed... I've heard of some 100,000+ line Perl projects, and that just sounds insane.)
Anyhow, Perl is really not PHP's competition, and despite the current situation I don't think ASP is either. JSP and servlets are the strongest competition for PHP. (I'm not making bets on Python or Rebol, if you're going to ask. :) )
jimbo
11-14-2000, 01:23 AM
Paul, you make some very good points.[nbsp][nbsp]But all I can think of after reading your post is that scene in Goodfellas when Joe Pesci's character says "What, do I amuse you?[nbsp][nbsp]Funny how?[nbsp][nbsp]Like a clown?[nbsp][nbsp]Funny how?".
The same can be said for my points and your relative contradictory points.[nbsp][nbsp]"versatile how?[nbsp][nbsp]How is (insert preferred language here) versatile?".
PHP and Perl and versatile in their own rights, but in different ways.[nbsp][nbsp]You brought up shell scripts, that sort of thing.[nbsp][nbsp]I wouldn't dream of doing in PHP.[nbsp][nbsp]
Yet there are some other things that I would do in PHP that I wouldn't dream of doing in Perl. Let's take for example the ever popular "Form Mail".[nbsp][nbsp]A very popular form to email script coded in Perl.[nbsp][nbsp]It takes about 10 lines of PHP code to do the same thing that FormMail does, not taking into consideration the error subs, just the actual mail sending functions.
As you said, PHP was developed for the web.[nbsp][nbsp]For web programming, it is very versatile.[nbsp][nbsp]Versatile in ways that Perl is not.[nbsp][nbsp]And the same is true for Perl being versatile in ways that PHP is not.
I don't know that much about JSP/servlets, though I would love to learn a little more about them.[nbsp][nbsp]As long as it's not a proprietary technology of Micro$oft like asp, it's alright with me ;) .
-jim
vBulletin® v3.6.8, Copyright ©2000-2009, Jelsoft Enterprises Ltd.