You know, it really has to be said. People say it so often, PHP is not a professional language. It lacks structure, proper testing facilities, a professional approach. Anyone can be a PHP coder, but when you want to graduate to being a software engineer, then you’ll look at Java, Ruby, Python or maybe C/C++.
Personally, after witnessing first-hand, on a multitude of occasions, the slapped-together applications, the cornucopia of hastily cobbled together websites and the miasma of half thought out designs, it’s little wonder that PHP is so oft to be derided.
But despite all this, I’m drawn to it. Maybe it is because of that laissez fair approach which encapsulated the UNIX hacker ethic; maybe it’s the C-like syntax so I can pretend I’m working with advanced, embedded, SCADA (supervisory control and data acquisition) systems in a mine in darkest Peru when, in reality, I’m adjusting a shopping cart in south London; or maybe it’s something else entirely?
But whatever it is about PHP there’s something that draws us in? I have personally witnessed PHP’s low barrier to entry see it flourish into the singularly most used language on the net today. According to PHP Usage Statistics PHP has the following stats:
Table 1: Data valid as at 27 May 2011
I’ve seen how its flexibility and adaptability have seen it undergo a metamorphosis into a fairly advanced language, containing Java-like OOP, C-like exception handling, closures and lambda functions, argument type hinting and countless other features and libraries; which allow it so simply to interact with the Google Checkout, PayPal, OpenID, consume RSS feeds with MagpieRSS and so much more.
But my fear is that it’s attracting some if the wrong kinds of people. People who think they’re developers, who carry-on like they’re developers, expecting the respect that comes with being a genuine and experienced software engineer, yet who do not possess the dedication, commitment, or skills of true engineers. I fear that this current acceptance of all comers cannot help but to hinder it from reaching it’s best.
No, that is not the way to be either. I believe in the potential of PHP, of what it brings to the software development table. Perl has a million ways to do anything; Python has one right way; Ruby has the principle of least surprise and PHP has a blending of these approaches.
Are any of them more right or wrong than another – no! They’re a reflection and expression both of the creative minds behind them and the community that forms around them. They’re an expression of human consciousness, made manifest, through a language.
But that’s not the point either. The point is, PHP and all advocates of it, need to not focus only on the technical aspects and underpinnings; does it have one true brace, should we have tabs or space, what are anonymous functions, what is the default visibility of a class method etc.
We need to focus on fostering a more mature and rounded attitude by the newer members of the community; one which is acutely aware of the scale to which their application may grow. We need to engender in the younger members the appreciation that throw-away code is for toying around, not for serious projects.
We really need to engender the complete mindset of both a craftsman and engineer;
We need to engender a spirit of learning through best-practice; using great frameworks, building and using great libraries, of taking the craft very seriously, without taking ourselves too seriously.
When we do this, when there’s a shift to this approach, I believe that we will have, as a result, a community with a, deserving, reputation that stands above all others. I look forward to that day with eager anticipation. I hope you do as well.
What do you feel? Do you completely disagree? Is this what you want to see? Don’t sit on the sidelines, get in, comment, tweet and discuss today. Let us know your thoughts over on our Facebook page.