By Matthew Setter

Can Great Apps Be Written in PHP – An Interview Series

By Matthew Setter

Can Great Apps Be Written In PHP?

I read an old post, circa 2010, on the MailChimp blog a little while ago, about their experience using PHP.

It struck a chord with me, because the sentiments they shared I’ve felt myself, and heard echoed many times over the years. What are these sentiments, you may ask?

They’re the ones which infer that PHP, despite all its successes, really isn’t a true programming language. They’re the ones which intimate that, no matter how good you are, no matter what you’ve achieved, if you’re a PHP programmer, well, you’re really not a true developer, yet.

They’re the ones which suggest, or is that presuppose, that you should really become one of the cool kids developing in Ruby, Python, or Go; basically anything other than PHP. After all, what can you really do with PHP, right?

Despite its successes, or people’s successes with it (a la Facebook, MailChimp, Hailo, Google, and others), it’s inferred we should use languages which had their foundations as pure languages; not ones which came to be a language, as PHP evolved into over time.

Here’s a few excerpts from the MailChimp post, which highlight people’s reactions to them using PHP as the basis of their platform:

Despite its popularity, PHP is considered by the programming elite, almost without exception, as one of the worst languages currently in use today

The term “good PHP programmer” is considered an oxymoron

You can imagine the horror and surprise we see when we try to tell a good developer that we use PHP to solve cool and interesting problems

I’ve both heard these sentiments expressed and, at times, felt a sense of insecurity because of them. So the post really struck a chord with me. I’ve done so much with what was once quite a humble set of scripts which helped out with Rasmus’ early development tasks.

And so too did MailChimp.

From the same article, here are some of their successes:

We use this architecture to process well over thirty million emails sent by tens of thousands of users every day, generating tens of millions of bounces, opens, clicks, and unsubscribes that all need to be handled in near-real time. We further process millions of API requests and millions of subscribes and confirmations every day.

All told, we handle well over 500 million dynamic page views a month. Our backend systems run millions of jobs every day, calculating statistics, querying geographic data, and scanning everything for bad behavior and abuse.

This is just going to get bigger and bigger as we grow by 500% or more every year

But despite this, PHP usually has a bit of a hard time, reputation-wise. At the PHP UK Conference in London on the weekend, Glen Campbell, one of the keynote speakers, expanded on this, referencing a number of links during his talk. Here’s a few excerpts from some of them:

One of the harshest, PHP: a fractal of bad design, writes:

PHP is the lone exception. Virtually every feature in PHP is broken somehow. The language, the framework, the ecosystem, are all just bad. And I can’t even point out any single damning thing, because the damage is so systemic. Every time I try to compile a list of PHP gripes, I get stuck in this depth-first search discovering more and more appalling trivia. (Hence, fractal.)

PHP is an embarrassment, a blight upon my craft. It’s so broken, but so lauded by every empowered amateur who’s yet to learn anything else, as to be maddening. It has paltry few redeeming qualities and I would prefer to forget it exists at all.

Jeff Atwood, from Coding Horror, has this to say:

What we ought to be talking about is not how terrible PHP is – although its continued terribleness is a particularly damning indictment – but how we programmers can culturally displace a deeply flawed tool with a better one. How do we encourage new programmers to avoid picking up the double clawed hammer in favor of, well, a regular hammer?

He also tweeted that:

PHP is the Nickelback of programming languages.

There’s a few subtle presuppositions in that assertion, but we’ll leave that for another time.

Or how about this quote from Fredrik Holmstrm:

Every solution I’ve ever seen or developed in PHP feels clunky and bulky, there is no elegance or grace. Working with PHP is a bit like throwing a 10 pound concrete cube from a ten story building: You’ll get where you’re going fast, but it’s not very elegant. … I love PHP, and it’s the right tool for some jobs. It’s just an ugly, cumbersome tool that makes me cry and have nightmares. It’s the new VB6 in a C dress.

Are These Assertions Correct?

I won’t say that PHP applications are always shining examples of software engineering excellence. But the old adage of a poor worker blames his tools can also be attributed here.

I’ve built applications which manage political fundraising events, simplify LDAP interfacing, customise e-commerce shops and more.

I’ve seen others build affiliate networks, create large CMS’ and finance packages. I’ve seen all manner of companies offer PHP bindings, such as Stripe, FreeAgent, Twilio and more.

So it got me thinking. Am I the only one who feels that, despite PHP’s shortcomings, it’s still infinitely more than capable?

Do others have similar sentiments, and like Glenn suggested in his talk, that we needn’t worry about the negativity and just get on with doing great things with PHP? I know there are!

Feedback From Actual Developers

So I decided to get out there and interview a number of people, people with solid, practical, experience, developing applications of varying sizes with PHP and get their input.

These are developers from a diverse range of companies and backgrounds; including freelance developers, expert development teams, such as Roave, through to large companies, such as MailChimp themselves.

Here on SitePoint over the coming weeks, I’ll be sharing these interviews with you. I’m confident they will show you that despite the validity of some of the criticisms circulating about, it’s largely inconsequential.

I’m confident you’ll find that if you’re a professional, you can make serious, enterprise, applications with PHP, should you choose to do so. What follows is the first interview, with Bobby Deveaux from Twist Digital.

What Lead You To PHP?

Back in the Year 2000, I was playing a game online called Planetarion. It was a MMORPG – I loved it! I was only 15 at the time and had limited knowledge, so I tried to download the game using wget. Silly me.

I researched online how to create a PHP file (the game was written in PHP). I ended up downloading Black Nova Traders from SourceForge ( – I contributed and learned a lot of PHP (bad, but PHP nonetheless). It introduced me to ADODB & MySQL, and the foundations of my PHP skills. The is the primary reason I love Open Source.

What Have Been the Things About PHP That Bit You?

It’s difficult to say whether things that have bit me were due to PHP or not. But some things I do find really frustrating, even with the docs, is the age-old needle/haystack or haystack/needle issue.

It’s so minor, but I can’t remember the order for every function. Maybe it’s my bad for my choice of IDE, or perhaps I should just accept it… but come-on, array_walk and array_map having a different order?!

What Have Been The Highlights Or Redeeming Features

Over the years I’ve seen a lot of messy code. Admittedly, maybe at the time I thought it looked nice; but the great thing about the PHP community is that there are always improvements and new ideas being thrown around and it’s great to see how things have evolved.

What Are The Compelling PHP Features For You?

It’s ease. It’s so easy to throw together some code. I know some people find this the enemy, and the source of all evil, but quick doesn’t always mean dirty.

What Do You Want To See Added To The Language?

I’m not a sucker for perfection; and I’m not particularly too fussed about anything being added. The guys that work on PHP do an amazing job, and whatever they add is greatly appreciated. I like PHP for what is is. It certainly has it’s quirks, but it’s what I’ve grown to love about it.

Why PHP over Ruby, Python or Go?

I’m a Developer, not a PHP Developer – but I get paid to work on codebases which are mostly PHP, largely due to my experience. I’ve done my fair share of coding in Python and I like it. Once upon a time I used C#.NET, but that was short-lived. For personal projects though, I’ve started to use Go.


Do You See Yourself Moving To Another Language in the Future?

Definitely, I love the speed of Go. The only problem is finding time to learn how to use it effectively, and to create apps as quickly as I can in PHP.

Do You Have a Custom Framework or Setup?

I tend to use Silex as my base for APIs. For frontends I use either ZF2, Symfony2 of Kohana – depending on the requirements.

How Have You Implemented Deployment?

We currently have a release script, which basically SSH’s to all the servers and checks out a specific tag. i.e. ‘git checkout tags/v1.2.1’. I’m only a few months into a new job and we’re making a lot of changes. We’re working towards setting up a continuous integration server, but first I need to get the team writing unit tests.

We work on specific branches for every task and always deploy to a test/staging environment for QA. Our release script notifies the team of the commits between revisions and there is a ‘confirm’ release button to ensure it’s only released if everyone is happy.

What is in Your Standard Toolchain?

OSX, Sublime Text 3, Sequel Pro, Dropbox, Mou & Github, and of course, Spotify. We always use CodeSniffer to ensure code is neat, plus Sami for PHP documentation.

What Testing Tips Can You Share?

Aim for 100% coverage on unit tests. You might not get there, but make sure you aim for it. Some will say that it’s meaningless, but that’s usually because they’re writing the wrong tests.

Functional, non-coverage tests are fine when required, but if your unit tests are right then you’re probably covered. Behat BDD is worth a look if you haven’t already.. oh, and PHPSpec!

Are There Tools You Use Which You Can’t Live Without?

I’d be pretty stuck without OSX! I hop between Macs and sometimes I only have SSH. I can do everything I want with SSH and my SSH Key!

How Does Your Team Work?

When I started I managed to implement very mild agile implementation. We have a SCRUM board, but it’s not really SCRUM. The board has our stories/tasks but they have no effort/time estimate.

It goes against a lot of what I believe in, however we have a project manager responsible for managing expectations and, to be fair, it’s working really well. We can release multiple times a day via git tags and we keep the business happy.

Unfortunately due to the workload we tend to be a reactive team, rather than proactive. I’d like to implement SCRUM properly and let the project manager play the product owner role.. one day :)


So, did Bobby’s experience strike a chord with you? Can you relate? Have his experiences given you food for thought? Share your thoughts in the comments.

  • ferisoft

    I do agree with some, I dont agree with a lot, but personally I think the most fundamental flaw to the PHP community is the amount of shit code out there and the ease of entry. Generally the mentality of all php projects is lets make it simple so it runs on every shared host and idiot proof so every guy who toyed with PHP for a week can make changes. This has lead to incredible amounts of shit code out there, including most of the open source frameworks that are “proud” to power a huge portion of the web. I think the flaw is not so much with the language itself, since it’s not better or worse than any other dynamically typed lang, but more with the community and the sacrifice of standards and best practises in place of ease of simple changes (which looks like patchwork in most cases) and portability.

    That being said if you dont rely on open source frameworks and write your code mostly from scratch, PHP is as good as ruby or python or any other ones of the bunch…

    PS. Recently stuff has started to improve in the right direction with ideas like PSR, composer, well tested components, but its too little too late really…

    • What frameworks do you speak of?

    • I don’t really see how PHP community can a flaw in PHP. You should check Nomad
      PHP and It has kick ass community unlike other developer communities. What you’re refering to as a community you’re probably thinking of libraries. That is more likely bad coding practices issue. If you use more popular open source libraries and frameworks that support PHP-FIG and Composer there shouldn’t be much of a problem.

    • That’s my only real concern with PHP. Whilst making it incredibly easy to get up and running with, I’m concerned that it may not present as much of a challenge to really attract people with the right focus, with the love of the craft.

      Just slap it up, it’ll be right should never be accepted IMHO. I’m not suggesting to over-engineer anything. I’ve done that and it’s a complete waste. I just hope, that with some of the truly excellent improvements in the PHP core and ecosystem, such as PSR and Composer, that we’ll see an improvement in overall quality continue to rise, as it becomes an inherent part of developing with PHP.

  • Ben McFarlin

    A whole lot of nothing. I have been developing with PHD for maybe 7 years. Although I’m a certified .Net developer, I prefer PHP. I have developed an object oriented MVC framework that allows me to spin up prototypes in minutes. I have DAO generation tool that creates the PHP classes, database tables and all stored procedures. It scales like crazy with memcache and there are no licensing fees. I have no reason to look at Ruby or what ever other flavor of the month writers come up with. When it comes down to creating custom solutions that scale, PHP gets it done. Now this assumes the developer doesn’t need hand holding.

    • Tony Marston

      My experience is similar to yours.
      I have been developing with PHP for 12 years, and with other languages for several decades before that. I develop back-end web applications, not front-end websites, and to assist in this I created in PHP a development framework along the lines of two similar frameworks which I developed in two previous languages. My PHP framework is built around a combination of the 3-Tier Architecture and MVC design pattern which means that all SQL generation is taken out of the Model and maintained in a separate DAO.
      Unlike your framework I do not need to generate and DAOs as I have already created a separate DAO for each supported DBMS (MySQL, PostgreSQL, Oracle, SQL Server). I do, however, generate all my Model classes from my custom-built Data Dictionary which has all its data imported directly from the database schema. Unlike any other MVC implementation I have seen I also have a pre-built library of reusable page controllers and a single View module which creates HTML pages from a pre-built library of XSL styylesheets.
      This framework allows me to create a new table in my database, import it my Data Dictionary, export it to my application by creating the class file (Model), then generate a full set of transactions to view and maintain the contents of that table in five minutes without having to write a single line of code. These transactions are instantly runnable through my framework which has its own Role Based Access Control system, dynamic menu system, audit logging system and activity-based workflow.
      I would like to see all those smart-alecs who think that PHP is a crap language try to duplicate what I have done in their favourite “proper” language. It is results that count, so shipping working code to end users is more important than how clever the code looks to other developers.

  • Jim Cook

    “…no matter how good you are, no matter what you’ve achieved, if you’re a PHP programmer, well, you’re really not a true developer, yet.”

    Gee, that’s terrible. If you want stigma, try being a ColdFusion developer. :) Seriously, this is a good article. I get tired of the “what the cool kids are using” or “what our competitors are using” approach rather than vetting needs and choosing a language/platform solution that works best.

    • Same here. I appreciate that I may have erred to a bit of melodrama, but that’s the stigma I’ve encountered intermittently. After a point you just get over it. Because if you can develop solid apps with it, then others be damned if they have some issue with the tools you use.

  • Kise

    PHP beats Python, Ruby, on the deployment front for the masses not for developers, Developer makes tiny percent of overall website ownership, its easier to tell somebody to take folder and upload it to their shared host, then to tell them you must have X, Y, Z to deploy your simple blog.

    that’s why Python, Ruby and Go will never take the lead over PHP, however Hacklang looks promising they could shed some of the PHP legacy behind and create something that is powerful and yet simple.

    • PHP runs the world’s most highly trafficked sites. I don’t know why the author hates PHP.

      • Kise

        The author does not hate PHP, PHP can works both ways as simple as 1 page website and as gigantic as Facebook, Wikipedia, its not the tool problem it’s the person who is using them.

      • Taylor Ren

        Don’t get the message wrong. The author does not hate PHP at all.

        • Very true. I’m quite the passionate PHP evangelist. Just ask me, anytime, and I’ll very happily defend and support it.

      • dojoVader

        Matthew a PHP Hater? You are far from wrong, Matthew dedicates a lot on PHP especially Zend he’s only explaining why devs hate PHP.

    • Setting up a production Go environment is not any more difficult than setting up a production Apache + PHP environment. Keep in mind that running a single Go web app is just a matter of running an executable. There is absolutely no reason why a Go app could not have an easy installer.

      • Kise

        the point is most people dont do the production setup themselves, they use typical shared host ENV, and asking somebody to upload files using cuteftp, filezilla, etc is much easier then telling them to “you need to login to ssh, if your host allow that, and then you need to run the app in background using some shell magic.”, if you cant see the difference that’s unfortunate.

        People always will choose the easiest method in everything they do, for eaxmple Linux is much better then Windows when it’s come to stability and Secuirty but people keep choosing windows becuase its come pre-installed and and easier to use overall.

        • People who are only going to use out-of-the-box software aren’t really of importance to this discussion. They aren’t the ones paying $10k+ for the creation of a website or web service. The niche you are talking about is being gobbled up by easy-to-use services that provide point and click website building. The software that runs those services can be just about anything, because those clients don’t need to be able to go through a whole deployment process.

          • I can’t comment on specifics, much as I’d like to, but I wholeheartedly agree with Evan’s sentiments. Just because it’s easier, isn’t necessarily what leads someone to choose an option. I agree that there are a lot of people who take the easiest option available. But for others it can be the challenge, or options such as Linux may be perfectly normal (myself included).

            FTP specifically is a good case in point of why the “easiest” option may not be what it seems. There’s many reasons that I’d always defer against it, but the greatest is because it’s so easy for files to be missed when uploading, thereby leading to a break in your application.

            Whereas, taking more time to learn services and software, such as or Phing, can make the deployment of complex applications almost a breeze. Whilst these have an initially higher barrier to entry, the automation, the removal of human error, makes them IMHO the more economical choice.

  • Taylor Ren

    The personal experience on using PHP will vary but I do agree most on this statement: a poor worker blames his tools.

    I see people coming up with poor codes with C/C++ too. So shall we blame C/C++ as a poor language?

    PHP does have those lousy libs out there (one example quoted above is the “hay/needle” or “needle/hay” issue). But that is not the fundamental thing in programming. What I mean is, if that is something really important to you and you feel frustrated in the coding about this, probably you should really wrap up a few things like that and wrap it in your own way.

    We also see some high / low level re-engineering on PHP too. It could be a top-down then bottom-up approach. I

    • Taylor, that’s one of the key reasons that I’m so fond of Composer and Packagist. To me it’s the right approach to help bring the best to the top and let the rest fall where it may. By making it so simple to develop, make available and find the best of breed libraries, I’m hoping in time that key libraries will emerge, which are the ones that everyone reuses and also improve on; helping us all become better.

      • Taylor Ren

        Hi @settermjd:disqus

        You are reading my mind.

  • Roman

    I think this is more a question for psychologists (or psychopathologists, to be more accurate) than for programmers. People with depression or other flaws tend to focus on and look for things and aspects they dislike.

    • Yep. Very true. Perhaps I should have taken the positive angle instead. But I really wanted to provoke thought and debate.

  • hot_rush

    php – easy way to start and hard way to grow up. f.e. facebook or vk expore a hhvm and kittenphp.

  • Jingqi Xie

    May I say that at first sight, I saw “Great Apes” in the title?

    • Love it. In some ways, with the arguments we engage in, perhaps that’s not such an inaccurate way to look at things.

  • Jingqi Xie

    As far as I am concerned, PHP may not be a good language in its syntax, but it has many great frameworks built for different purposes that we can (mostly) freely use.

    • Damn right. Each designed for specific purposes and aims.

  • Tony Marston

    The idea that PHP is not a proper programming language can only come from people who have a peculiar definition of both “proper” and “programming language”. I, and millions of other developers, can write effective programs using it, therefore it is a programming language.

    The idea that just because some people write crap code in PHP means that all PHP code is crap is nonsense. It is possible to write crap code in any language, so it is down to the skill of the individual.

    The complaint that PHP is inconsistent due to the haystack/needle and needle/haystack problem is complete rubbish. Each of the PHP functions was written to duplicate the equivalent function in the C language, so any inconsistencies come from the C language. All languages have their inconsistences, but you either have to learn to live with them, or switch to another language (with its own set of inconsistencies).

    The idea that “PHP programmer” is not the same as “software developer” is utter crap. I developed business applications in other languages for several decades before I switched to PHP, and PHP has enabled me to build identical applications in a fraction of the time, and with more features. In order to do this I had to write my own framework as all the ones that I looked at were crap.

    In my humble opinion a lot of OO code, both PHP and in other languages, that I have seen written by so-called “experts” is utter crap because it is over-engineered and far too complicated. A framework that requires 100 classes just to paint the index page is over-engineered. A library that requires 100 classes just to send an email is over-engineered.
    Anyone who cannot write anything other than crap code in PHP is a crap programmer.

    • Tony Marston, I invite you to author a blog post on your thoughts about this topic for my blog Mr. Geek . :)

      • Tony Marston

        I have written numerous articles on the subject of software development with PHP as well as my earlier languages (COBOL and UNIFACE) which can be found at
        I am in the middle of writing a new article which explains why I think that 90% of the so-called “best practices” in PHP are nothing more than over-complications, over-engineering and code bloat. As far as I am concerned anyone who is incapable of writing effective software using nothing more than encapsulation, inheritance and polymorphism is just that – incapable.

    • Hi Tony, thanks for such an impassioned response, one which has my full support and enthusiasm. For so long I saw PHP a lot like Perl, the hackers language, but with a special emphasis on the web. But then a stigma grew attached to it, one which I wasn’t prepared to deal with anymore. So, hence, this post, my first attempt to change all that.

  • I’d love to know more about the code you’ve written. Sounds truly excellent.

  • Hannan Akbar

    You can wrap poor code with libraries and sweep needle/haystack under
    the carpet, but at the end of the day you and your fellow developers
    will be dealing with its ubiquity. Dynamic typing comes handy, but you
    end up using identical (===) operators and these sort of things, type
    mismatch bugs, also in result you get less readable code. Its possible
    to write beautiful self-documenting code using PHP only to some extent. I
    mean, C#.NET folks are more obvious to craft graceful code like an old
    granny, as they reminisce old days of VB6 and C. :)

    • I agree and it’s in part hard to avoid decisions to deal with previous decisions, when PHP started from where it did. There is the potential for new developers to do better than some of us much more seasoned with it, by avoiding learning the poorer choices and going straight to the better ones.

    • Joeri Sebrechts

      PHP has a good reflection class. I’ve used it to implement annotations (via phpdoc comments) that allowed me to declaratively specify web service api’s in such a way that they automatically validate their input for correctness (similar to java bean validation) and automatically generate a soap wsdl descriptor. PHP is loosely typed, but it gives you just enough typing and reflection capabilities to layer a strictly typed api on top of it without too much boilerplate coding.

  • It can be and was for some time. I’m not sure that with the recent releases it’s quite so cut and dry any more though.

  • FreeProg

    Dear Matthew,

    Thank you for this article.

    You wrote that you use ZF2 or Symfony2 in your projects (depending on the requirements)

    Both of them (Zf2 & Symfony2) big framework.

    Which is better for big project? (for example: webstore like Magento)

  • Joeri Sebrechts

    In my opinion, the biggest problem PHP has right now is its reputation. I work on a 500 KLOC PHP web app, which is used by millions of people in enterprise contexts with high security, reliability and performance requirements, and over the past decade I’ve found that PHP has worked out well for us. We can build code fast, ship it reliably, maintain it easily, and evolve our codebase efficiently. Ofcourse it’s not perfect, but we don’t have more issues than we would have developing on Java, Python, Ruby or whatever alternative. However, the reputation is what is killing us. We have a hard time attracting top development talent because we use PHP. When new management came in whose previous experience was more java-oriented, we had to spend a lot of time and effort rationalizing the choice for PHP. If people stopped bashing PHP it would make actually using PHP a lot easier.

    I’m often reminded of Javascript pre-Crockford. Javascript used to be the worst programming language ever made, with people bashing it even harder than they did PHP. Douglas Crockford redeemed it. Javascript didn’t change, but people’s perceptions of its qualities changed. I feel like the same thing must happen with PHP. Hating is easy. I can write a “fractal of bad design” article about C quite easily, especially given the excellent example we just had in the form of the heartbleed bug (if PHP is so bad about security, why are all the worst issues in C code?). But if I did so, what would it gain anyone? Nobody would be swayed from using C who is already using it. It would just cause division and conflict, and it wouldn’t solve a single thing. The hating needs to stop and the way to do that is to market PHP to the masses as a good language when used correctly.

  • yuanzhou19

    I started to play with PHP 8 years ago when I was still in college. I’ve created many PHP sites/apps and also developed my own PHP5 framework ( over the years. I’ve tried Ruby and Python, and I implemented some of their good ideas to my framework too. So far I’m very proud and very happy about PHP. Web development isn’t only about programming languages, it’s about using the different tools to finish a project before the deadline. PHP per-say, is getting better and better with very active community. I don’t see any advantages that my Java or .NET developer friends have over mine. I can get things done very quickly and have it deployed very fast. Whenever I need something, I go to check the PHP manual for more details. Very simple, that’s it.

    • Thanks yuanzhou. My sentiments exactly!

    • Webdevilopers

      At the first moment I read you were using “PHP8” years ago, @yuanzhou19:disqus ! ;)

  • PHP has definitely matured a lot over the past few years or so and is still a useful tool for creating websites. However, it is not the best tool for the job. It’s good to hear that you have started using Go as well. I recently wrote a small CMS for my personal site using Go and it was a fantastic experience. That is a web language that is go-ing places! ;)

    • Go certainly is and it’s obtained a lot of the cool-ness factor which Ruby once had. But I don’t see that PHP isn’t necessarily the best tool for the job. In all cases, no. But it’s definitely got a good place where it works well.

  • pein87

    Php isn’t a bad language. A lot of this hate comes from Rails, and Django developers. Php unlike the others is not a language that is built around an object much like Ruby(everything is an object). Php syntax wise is not the best and could be improved. Php gets it’s syntax from C and makes it unique among the modern languages. Unlike Ruby/Python Php does not have all the bells and whistles out of the box. In php you use the same methods you would in C. Ruby/Python facilitate abstractions of basic operations in objects. You can write less code in a cleaner way to do most of your tasks without knowing the mechanics of how to do said task. In php you need to write the functionality yourself. That creates a learning curve and gives rise to poor code. Php also didn’t follow any standards until recently. Rails popularized MVC for web apps and is one of the causes for so many ruby or more or less rails developers. You can compare languages all day. C doesn’t have pretty syntax but nobody slams it. Everyone now in days wants the tool that’s going to allow you to write apps fast and easy. Granted php isn’t elegant but it can do whatever job any other web or high level language can. At the end of the day syntactic sugar is visual. Ruby and Python abstract all of the low level choru that php devs have to write the functionality for themselves. In any camp if you don’t know the fundamentals you are not a programmer. It;s easier to write an app in php or was until php frameworks like laravel came out. Php has all the utilities as those languages do. Enterprise applications have been made with php. More apps have been made with php that are readily usable. with each camp there is a learning curve. Ruby/Python is easier for designers to use, period. The syntax is easier to read and because of the abstractions little real code is needed. We’re all professionals here and bashing each other over language choice is petty. Php can give you the same results as any language. A lot of c/c++ devs find php easier to use because it’s syntax. Every language has bad code. It’s apples and oranges here, both fruits but a different kind. You are a developer if you write good code no matter the language.

  • Craig Buckler

    There are two types of programming language: those people complain about and those no one uses.

    PHP is a little different because it evolved over a long period. As developers used it for more sophisticated applications, PHP received more functionality – such as OOP. However, it needed to stay (reasonably) backward-compatible which is why PHP3 programs can still run on PHP5.6 today.

    The advantages: novice programmers can be productive within hours and experts can create beautifully complex PHP applications. This has led to massive success but the flip-side of PHP’s flexibility it that it permits inelegant code. Is that a fault of PHP? Absolutely not – you can write bad code in any language. I have!

    • Hi Craig, thanks for your feedback. It’s exactly that conundrum which I’ve been working with for some time. On one hand, I’d love it if PHP had a slightly higher barrier to entry, so that you couldn’t just write anything.

      Yet on the other hand, how high is high enough, and would that discourage solutions to be implemented, which don’t need full stack languages, such as Java, C# etc?

      And you’re totally right too about being able to write rubbish in any language. I have too and learned a lot from it. Maybe it’s just a bit of ego talking, in wanting to see a higher barrier to entry.

      • Kise

        I think phptherightway dot com should be listed in every PHP doc page, it could improve the code ppl write so much, and i disagree having higher entry barrier will discourage people from learning PHP, PHP beauty comes from its easy to understand syntax, once you are good dev you will learn the best practices like other langs.

        Hacklang could be the successor of PHP they said in their dev conference that they will try to rewrite most of PHP standard library to be consistent so no more “haystack/needle, needle/haystack”.

      • ckrracing

        Hi Matthew ,
        I have never thought PHP as such has been a problem , what I would like to have seen fixed is at least making it obvious to new devs how to validate input and escape output. PHP’s security model has made it seem amateurish in the past. I do think PHP has to be careful that JS isn’t eating it’s lunch with node , there is a danger of a whole new generation of devs learning nothing but JS as it now provides the full (#mean) stack .. the world is changing and I think the community needs to look to make sure we don’t become irrelevant.

  • Well, the lion’s share of my experience, out of the two of them is with ZF2, but if it’s not suited to the job, then I don’t use it. For example, I’m also happy using Slim or Silex as well.

    The term “big project” is a bit broad. Can you define what the requirements are? Does it have a lot of interaction with a number of external services? Is your organisation looking for an “enterprisey” implementation? Will it be worked on by a number of users?

    If you’d like to discuss it privately, tweet me (@settermjd) and let’s chat further.

  • Ahmad Samiei

    We are using PHP for MVAS in telecom industry.
    daily sms for VAS services in mobile operator with 54m subscriber with
    no problem. In all this years I didn’t see bottleneck in software side
    when software architect well designed. I think all this languages are
    great and good enough if you use them professionally. there is some side
    cases in software architect that are not depend on language. like flow
    of message queue system in our case or database design or cache systems,
    backup scenario… they was our edge in all this years.

    there was only one big problem with PHP! it was very hard to find expert
    developer. And I think this problem come from old PHP learning courses.
    Most people who were interviewed were the only Php coders. they was’t
    real developer. even they have no idea about OOP, software architect. This problem is less common in other languages like Java.

  • Shaun Cave

    Is it hard to grow up because of the language or company leadership? I would argue leadership. Facebook’s problem, for example, is lack of innovation – a leadership issue – not poor scalability.

    • hot_rush

      i agree with you partly. but what innovations do you mean?

      • I mean Facebook isn’t really innovative at all. How much has the user experience really changed or improved over the last 2 years? Not much. They spent 21 billion dollars, in the last four months, on two, at best, questionable mergers (Ocululs, which isn’t yet a proven technology, and WhatsApp, which was insane at $19 billion).

        They spent too much on acquisitions, and could have used that cash to create new products that change the world. Look at Google. They are innovative.

  • Wonderful article! On a bum note I know off too many PHP developers who are either critical of PHP or not interested in pushing the bar respectfully representing their skill (despite the opinions from developers of other languages).

    This article and many other positive things I have read/experienced shows that proof really is in the pudding.

    Its language … not a solution … thats your job!

  • Roosevelt P

    I have been using PHP for at least 5 years of my development career. And the kind of projects I worked on were adopted by individuals, governments and the cool start-ups. Some people have a false pride about whatever they learn or do… e.g. a programmer coming from the C++ or Java background will boast how cool those languages are or would frown upon something different. C++ or Java would be bit redundant to create a web app… especially when you have a solid framework to make use of in PHP, Python, RoR or… even Perl if that is still around :P…. FYI, I know both C++ and Java as well to argue both their strengths and weaknesses in relation to PHP.

    The point is if PHP was that bad then it would not be around for this long and it would not be one of the preferred choice by the businesses and companies that are spending millions of dollars on their projects. PHP can be used to create any kind of web application and if you really want to create portable desktop applications then something like XAMPP, Tide or PHP Nightrain would be the way to go since PHP GTK is good as dead. The PHP applications failing or poor performance can be traced back to the actual developer’s knowledge, development style, organizational skills and ultimately his imagination. However, if performance is an issue then you have no other choice but to review your code, increase your resources or test by adopting something like C, C++ or in some cases Java.

    The kind of projects we are working on greatly depends on the individual or the organization’s needs. PHP is the solution to all is as bad as arguing C++ or Java is the solution to all. I advice all the developers to keep an open mind and not fixate on a single language. Because the needs change drastically and you will have to adopt something different to meet that need or fix an existing issue.

    Long story short, PHP is cool! Use it if it meets your long-term needs!

  • Gary Benner

    There are different languages for different purposes. As an applications programmer, as opposed to a system programmer, I used Delphi for PC applications ( still do) as I was most productive with that environment. In moving to web based apps, I found PHP early on, and using the skills learnt from programming in Delphi ( the underlying pascal language teaches you good habits! ) find PHP incredibly productive, and easy to manage.

    In 43 years of programming I’ve seen languages come and go. I’ve seen the criticisms leveled against PHP, and can only note that those making such emotional arguments must have emotional problems in their personal lives. I overlook them in preference to arguments with metrics, rationality, and practical experience.

    People vote with their feet, and that is the best measurement of success, and PHP scores on that highly.

  • Obviously you can’t write an interactive web application with php alone, but it is designed for serving webpages, and does a fine job at that. I was able to build my own framework without too much trouble and it does pretty much everything I had envisioned it would.
    I would like to see support for events and functional programming, then it would be awesome! The best part of PHP is the vast library and community, also the simplicity of basic use is a bonus! Of course it is a programming language, it is still fundamentally a procedural language having an identity crisis, my opinion.

    • PHP is many things and for me that’s something to be loved about it. I really just love the “hacker ethos” with it, that it’s a little ugly, a little rough around the edges and so on. It’s not perfect, that’s for sure, but does a great job at many things. There are other languages which are more pure and arguably are specifically designed with one way in mind and there are positives and negatives on both sides. Make the most of it, where it’s appropriate to do so.

  • I’m keen to read your post mate. Eagerly awaiting it. I think I pulled over too much baggage from writing C and Java when I started in PHP. In quite recent times I’ve started to strip out anything which doesn’t seem necessary to just write an app.

  • An old lecturer of mine at University always pushed the point that language was really irrelevant, it was what you were trying to achieve which was most important. Another colleague reinforced this. Myself and friends would always think language first, problem second, when we started out. They worked hard to change this, and I’m glad they did.

  • Hi Gary, well said mate. I admit that I’ve not spent much time with Pascal or Delphi; a favourite lecturer of mine was an Ada fan and expressed the same sentiments as you have for Pascal. The point about rationality, practical experience and emotion ring true with me.

    The question I wonder at times, especially more recently, is “are people really having issues with a language, or are they pandering to their egos, emotional needs, or wanting to seem hip/cool/with-it”. I don’t mean to infer that all are. There are good technical points for and against PHP, like any language. But at times it seems more to be a bandwagon to jump on, being for or against something in tech.

    So many flame wars have come and gone and I’m sure many more are to follow. I’d rather look at the specific technical reasons for or against a decision, than engage in an emotional debate.

  • SH

    One of my frustrations with PHP is some of the poor choices that were made with regards to type checking. A great example of this is when making comparisons with strings and numbers. For example:

    ‘123 Hello World’ == 123 evaluates to true

    In python and Ruby this would produce false. You almost always have strict checking when comparing variables, because the data you are comparing may not always produce your intended value. Some PHP functions like in_array also perpetuate this kind of thing. But this type of decision making has been a fundamental part of the language as far as I can remember — I started with PHP 4? Damn I’m old… Remember, PHP started out as a templating language with the goal of making it easier to display HTML… It didn’t start out as a programming language; it became one after much effort from the opensource community, so some of the earlier ideals of ease of use that went into it initially, permeate the code base. Remember when register_globals and magic_quotes weren’t deprecated was used by the cool kids? But so long as you know about these little nuggets, it’s not a big deal… unless you are inebriated… Not that we programmers ever drink… **cough**

    Another frustration that I often have with PHP is Fatal Errors…. They shouldn’t exist… They should be exceptions, cause exceptions you can catch and handle gracefully without needing to roll fancy error handlers to catch errors in order to throw exceptions… Yah… What’s really funny though is when your error handler causes a fatal error… But hey, that’s what logs are for. You log your errors and then you fix them, though it would be nice if errors came with a stack trace, but hey that’s what debug_backtrace is for right? Unless you’re using APC… then you’re all hells-a-SOL cause line numbers aren’t always guaranteed:

    PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0? Ah…. #dafuq

    While we’re on the subject of APC, it’s really fun when you get APC and Zend Optimizer enabled at the same time. You get these random intermittent fatal errors because the opcode is run through two opcode caching engines and gets fubared. It’s frustrating, and unless you know what to look for it, its almost impossible to figure out, but hey Google gives you the answer in all but 30 seconds? So it’s not that bad… Thank God for stackoverflow…

    And yes, there are a lot of other gripes that I have with the language and, sure Python, Ruby, Erlang, Node.js, Java, hell even C++ have cool features that I’d much rather use sometimes. But at the end of the day, the guy that writes my pretty check says “We use PHP, and so do you.” so I kinda have to bend over and take it like a man… And cry…

    So am I going to switch from PHP? No
    Am I going to learn other languages? Yes.
    Am I going to bitch about how horrible PHP can be while I’m drunk? Yes.
    Am I still going to use it in the morning when I go to work? Yes.
    Am I going to fix all the problems that exist in PHP? Yes — I mean hell no…
    Am I going to STFU and stop bitching about how horrible PHP is? Only when I’m sober…

    Too lazy to spellcheck…

  • Matthew, thank you for your post!
    I think that many PHP developers like us really suffer the stereotype from the community that we can’t develop great apps using PHP and sure, PHP is not the right tool for everything.

    Great post!

Get the latest in PHP, once a week, for free.