Announcement
iPhone DZone: Fresh Links On Your iPhone by matt at Sat Jul 05 14:09:51 EDT 2008
Reading DZone on your iPhone just got a little bit easier. Visit http://dzone.com/iphone from your iPhone to try out our beta iPhone support. You can view stories, filter by tags, and login. We'd appreciate your feedback at feedback@dzone.com.
Open 24/7/365. Never a waiting line! Login and vote now.
By jimbojw
via jimbojw.com
Published: Jan 24 2008 / 09:09
Ugh. I am so tired of defending PHP - even from people I know and respect and who use it every day. So here I'm going to make my last stand. In all future arguments I get into, I will point back to this article as my sole defense.
Comments
Lars Pohlmann replied ago:
I myself really like php5 as well, but your " Irrelevant complaints" are quite relevant.
- namespaces: I use classes,dude. But in fact the number of classes in use can grow to such an extend in "enterprise-applications" (i know, this word sucks), that even there you'll get into naming-collisions...
- globals: yes, they can pierce through your code, they do it so well, that you'll never find the place again, where you defined the variable... this generates dependencies, that are hard to unravel.
I'll leave it at that.
ilazarte replied ago:
I definitely miss static typing when working in php. What's "right-click, find-callers" for Java code takes grepping/searching in Php. It really hurts refactoring which is an activity of a few minutes in Java. In Php the mention of it makes the dev team nervous.
,
robse replied ago:
php5 introduced type hinting. "Go to declaration" and similar IDE commands can therefore be supported.
Don't know if it works in eclipse but it should. Also from what I've heard, namespaces may be coming to php5 soon (also: see http://www.petitiononline.com/phpns/)
Voted down for the "Irrelevant complaints" section
Barry Carr replied ago:
Voted down because he glossed over many of PHP's deficiencies, namely: inconsistent function naming conventions; having to remember where to use ===, !== and ==, !=; Its got a nasty, nasty syntax e.g. $var and $this-> and last but not least, security.
Plus, as Lars mentioned, his irrelevancies are, indeed, really relevant.
legendx replied ago:
One is case sensitive.. am I missing something?
davidwalsh replied ago:
I don't understand PHP haters at all. Each language has its place in the web and it's up to the programmer to decide which is best.
I too dislike the inconsistent function naming, but is it really that big of a deal? And is the comparison syntax really that tough?
To your last deficiency Barry, security is ALWAYS a developer issue. If a developer doesn't write secure code, there will be a problem. Blame the developer for this; not the language.
legendx replied ago:
PHP's strength and weakness is that it is flexible. Done. The only reason rag on php is because a lot of people write poor code. It's not php's fault that you didn't check for sql injection.
raveman replied ago:
lol, i never heard anybody attacking php, first i thought that ruby people were fighting against php since ruby is better version of it, but at first chance guy took swing at java, just weird for me.
i like php, there is just something cool about it, however i dont want to read your php code.
,
Rob Lang replied ago:
It's not a balanced article, it's just a fanboy's rant.
Voters For This Link (13)
Voters Against This Link (12)