A Conversation for The H2G2 Programmers' Corner
Why should I learn PHP
Rat, who can't remember his way round this bloody thing. Started conversation Jul 3, 2006
Lots of people keep telling me I should learn PHP but none of them can give me a good reason why.
A typical conversation goes along the lines of:
"Why should I learn PHP?"
"It's better than Perl"
"Why?"
"It just is, and its easier"
"But I already know perl, so perl is, by definition, easier for me"
"It's more powerful"
"In what way?"
"In every way!"
You get the idea. The question is, should I learn PHP and if so, why?
I'd only need it for my own sites which are hosted on a rather nice dual xeon server, so resources arent an issue...is there any good reason why I should change from Perl to PHP?
Why should I learn PHP
Wiro Posted Jul 3, 2006
"is there any good reason why I should change from Perl to PHP?"
No, I don't think you should change.
A more sensible thing to do would be to learn php and use both php and perl as you see fit.
A good reason to learn php is that alot of people use it now, so if you want to take a look at how somebody has done something, you know what you are looking at.
So basically, you should learn it for the geekiness factor of knowing an extra language. Personally, I just know php, I havn't used perl as yet, I think it would be a cool idea, yet I havn't had the impetus to actully go do it.
Why should I learn PHP
Peet (the Pedantic Punctuation Policeman, Muse of Lateral Programming Ideas, Eggcups-Spurtle-and-Spoonswinner, BBC Cheese Namer & Zaphodista) Posted Jul 3, 2006
And after you've learnt PHP you should go back in time a little and learn Python. (I haven't yet, but I'm just about to! )
The thing is, you never know when one specific language will come in handy. Up until six months ago I just thought of Python as an obsolete scripting language replaced by PHP and Perl, but then I got into "Blender" for 3D graphics. Well, whaddya know? It's got a Python interpreter built-in! You can script your own surface renderers, write complex "camera moves" etc., etc.
So, I'm going to spend this winter learning Python.
Another good reason for learning a number of different languages is that it helps you to look at a given problem more clearly; you can more easily seperate the aspects of solving the problem from the aspects of implementing it. I learned "Forth" about twenty years ago, and while I loved it I haven't actually written anything in it in, well, nearly twenty years. But, I was trying to solve a tricky problem in a PHP script, and I was able to eliminate several loops and SQL queries by implementing a simple stack; it turned out that pushing and popping thread addresses on this stack (I'm working on a message board project) was by far the simplest way to achieve the thread ordering I needed, yet had I not been exposed to Forth the idea would never have crossed my mind.
Key: Complain about this post
Why should I learn PHP
More Conversations for The H2G2 Programmers' Corner
Write an Entry
"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."