I often get asked by potential employees and clients, why we do PHP and mostly PHP only. A valid question, of course and my first answer usually is (besides the “historical reasons” one), that nowadays all those server side (scripting) languages are mainly the glue layer between the front-end (the browser part) and the back-end (your storage and “database” solution) and not the one and only defining factor if your project will be a success. Or not.
Python, Ruby, PHP, they all have their merits and disadvantages, but could all do the job equally well for our daily business. The important deciding factors happen in other areas nowadays.
But, why don’t we use a “cooler” and “cleaner” language then, if it doesn’t matter?
For one, as said, historical reasons. We invested a lot in PHP, our whole company has deep knowledge in PHP, we know what PHP can do and what it can’t. We attend a lot of conferences, know people who can help and we can even influence where PHP is heading to (to some extend, of course). And if there’s something missing or broken, we can try to fix it ourselves.
Then all our code is of course in PHP and reuse is highly important to us. There’s still code from the early Flux CMS days in some of our latest projects. Not because we’re too lazy to re-factor our code (we do that all the time), but just because it works, is tested and proven to work. We can profit from the work we did years ago and don’t have to start from scratch.
“But PHP isn’t very innovative lately” you may say. While that’s true somehow for PHP itself and there is certainly some lack of roadmap and governance there, it’s certainly not true what’s currently happening in the so called “next generation framework” space. With Symfony 2, Flow 3, Lithium and certainly many others, there’s a lot of innovation going on. I’m sure those will change the way we write well developed PHP projects. The people in those projects also talk together and try to make reusing components between them easier. No more “this is my framework island” stories. We live in a very exciting time here.
So while you may think that PHP is stalling, it maybe just matured enough to enable such great projects as mentioned above. Innovation in the PHP as a language space isn’t badly needed anymore, the magic happens in the frameworks on top of it (ruby and rails have the same relationship, I guess).
But nevertheless, PHP isn’t doing a full stop. PHP 5.3 brought namespaces and closures. PHP/Next (whatever the version number will be) will for example bring traits and even more speed and memory improvements. Stuff the frameworks can really make use of.
One last thing for us, why we stick to one language only, is that it was our strategic decision to concentrate us on as few technologies as possible, but to be as good as possible in them. Of course, we still constantly reevaluate new technologies and introduce them when they fit (we even have a written process for that, called “techmatrix” :))
This is for example why we use only Symfony 2 for all our new projects. You need very good reasons for using another framework. And as Symfony 2 has a similar mindset as our own “old” framework Okapi, the switch isn’t too difficult (and we can reuse code). I ported liip.to from Okapi to Symfony 2 in a few hours (without knowing Symfony 2 very well) and could reuse lots of code.
Yes, PHP is just the glue between the front and the back (Jackalope is one prime example for that), but a very good one at that and I’m sure we will be very happy with PHP for the foreseeable future. With all what’s going on in PHP-userland (compared to the PHP core), we currently live in a very exciting time. And I’m really looking forward to see the outcome of that. Don’t write PHP off just now.
Very interesting article.
When I started at Liip, I was wondering why Liip was sticking to PHP and only it.
After few times, I understood that this strategy was the best for a company: reduce the scope and maximize your knowledge of it.
Couldn’t agree more! I was thinking of writing the exact same PHP article but you beat me to it :)
i’m sorry but these assertions must be challenged. php coders have stockholm syndrome. they casually dispense with features available in perl, ruby and python in the 90s not because they don’t have novel value, but because they can’t access them in php.
Okay, what this article is really saying: “We know there are better solutions for a given problem out there, but we’re not flexible enough to try something different. We’re using PHP because we’re always used PHP.”
That’s just plain, wise business decision. Why change when it works ? Moreover, PH is far from the end of its life and therefore there’s nothing that indicates that it’s time for a change. Linux kernel is written in C and I’m under that the impression that it’s for the same reason :C is ok for the job, is not gonna die any time soon, so let’s just stick to to good tool.
However, PHP is “stable” but the frameworks are maybe more tricky. They don’t have as much stability( in the sense that their future is assured for say 10 years)…
Being “flexible” doesn’t mena anything. Rewriting a codebase is never a good idea in itself.
You say “But PHP isn’t very innovative lately”. you also say “PHP isn’t doing a full stop. PHP 5.3 brought namespaces and closures. PHP/Next (whatever the version number will be) will for example bring traits …”
This doesn’t work together. There is barely a language evolving as quickly as PHP. What the PHP development team does is trying to brign smaller units of change more often and trying not tobreak too many things so there’s no big “bang” related to a new version.
But I agree – the area seeing the most changes these days is in the framework space. Which is a good thing.
Interesting article. I agree that in the short term there is little to gain from switching from PHP to say Python/Ruby. Particularly if you have a large codebase used in an array of projects and your team has extensive knowledge and experience with PHP.
However, would you agree without this codebase and experience, that Python and Ruby are more attractive languages to adopt? This could be why languages like this combined with full stack frameworks are trendy with startups and companies jumping into the ‘web app’ bubble.
Modern PHP allows us to do interesting things in userland that’s not a problem.
My https://github.com/indeyets/appserver-in-php is a nice example of thing, which was impossible to have in old days. PHP became better, but is still far from perfection. Every now and then language forbids clean solution because of some legacy issue.
By the way, the worst news of last year was discontinuation of unicode branch, which means we need to do even more things in “userland”.
Oh yeah, and my “favourite” topic in PHP universe everyone reinvents their own bicycles. Virtually noone uses libraries built by other projects (and “other projects” rarely make libraries available for reuse). Pear is dead, Pear2 is not mature yet, Symfony2 builds everything from scratch. Zeta, ZF same.
I’m staying with PHP for now too. I know the language, I like it a lot and my work is tightly related to php. But I keep looking in other directions and lately I have a feeling that “glue language” can be easily changed. All the work happens in Content-repositories, communication-frameworks, etc.
Software’s role is to solve the problem at hand in the most economic way. Whether you use PHP, Python or VBA is beside the point, and of minimal concern to the client. The exception are the zealots who preach and practice less – cause they’re so busy preaching
Actually, this was an interesting article.
The shift from PHP as a language choice, to a framework choice was interesting for me.
However, I just wonder if the same effort of reducing scope may be better served with a better technology scope.
My bet is that your programmers are going home and using ruby and python and haskell or even clojure. If they are using PHP at home, in some sense you have hired the wrong people.
But I have to admit that this was the first PHP article that I will accept as a reason for using PHP. Its historical to the company and we decided that we couldn’t afford additional scope to learn a new technology stack and port over our knowledge.
However, while your frameworks are evolving, so is Ruby’s, Python’s and Clojure’s and Haskell’s, etc etc. So I’m unsure if you can value it that highly.
I would suggest creating a new project in a new and complex language. Use the one your dev guys are using at home. Maybe port all our code to xxxx is a good mini-project. Though I have no idea how complex such a project is. But I have seen very large projects ported to Ruby in weeks, not months.
I liked the core idea. but don’t let it cloud your judgment.
With the number of popular CMSs and custom coded websites developed in PHP, I dont think anyone can write it off anytime soon.
I for one welcome my new node.js overlords! :)
Obviously node cannot be anything as mature as the established stacks including the ones based on the ‘pile of functions” that is PHP. PHP very often just ‘feels’ wrong.
However writing web applications using the same language in the client and on the server-side is just sooo seductive. Especially so when talking about code and skill reuse.
The list of available modules for node is impressive! https://github.com/joyent/node/wiki/modules And I’ll argue that it’s the fastest growing ‘thing’ in webland (even faster than Python).
I really feel compelled to try building with node. It may well be the future.
Why we don’t stick to one technology (in german): http://blog.namics.com/2011/02/why-we-dont-sti.html
I think it’s just the good old “If things ain’t broke, don’t fix it”. After all your post doesn’t really show strong arguments why you guys stick with php. TL;DR because you invested too much you don’t want to change.
Hey guys. I agreed that selection of framework is fundamental. Would you look at http://www.agiletoolkit.org? What do you think of this new framework, does it stand a chance?
Don’t forget that python and ruby are SLOWER than php. node.js looks to be the first thing that may challenge php there.
And another huge thing in favor of php is drupal. Sure, you can code your own web app from scratch in django or some other low level framework and potentially have several xss security holes in your app that you’ll likely never even notice, or you can use drupal and its thousands of modules that have thousands of eyes looking out for and catching security issues for you, not to mention that 95% of the time you won’t even have to actually code in php since there are so many modules already available (google ‘drupal modules’). There’s a reason it’s the most popular cms in the world and so many thousands of businesses, governmental agencies (including the whitehouse), and schools use it.
@Yep … python/ruby are not slower and even if that would be the case, mod_python only runs inside Apache, so even if you wanted to use a light and fast server like Lighttpd / Nginx, you cannot without also dragging Apache along. FastCGI FTW ;)
Christian: using PHP is fine, keep doing it; technology choices are not that important when it doesn’t affect your budget (time, money).
Some comments to your comments (thanks for the feedback):
First: We don’t stick to PHP just because we have invested so much in the past and can’t easily change. We stick to PHP because we think it’s actually good and as Jordi said: “Gets the shit done” and therefore still do invest a lot all the time in PHP. We know there are other solutions to the same problem and we’re sure they are also very good, but we don’t think they are better than our approach with PHP for our use cases.
And we don’t hire the wrong people (because most of them are actually using PHP as well in their non-work time). We specifically try to hire the best PHP people available, we’re heavily involved in the PHP community and from time to time one from those communities comes to work for us.If one would say “I love coding Python, but for money I’d do PHP as well” THIS would be the wrong person for a job here.
So, everyone saying we’re just sticking to PHP for historical reasons got it backwards. We’re sticking to PHP because we think it has a future and still investing in it is definitively worth it (that we have such a large “rucksack” of PHP code and knowledge is an additional advantage, not the only defining one)
If we would think “Ou shit, we have used PHP so much, it’s actually shitty and we’d all like to code in python” then something would be very wrong with this company and I’d have to expect a mass-exodus all the time :)
Oh, something I forgot:
We don’t think PHP is the solution to every problem. We actually turn down a lot of projects where we think PHP is the wrong answer. For us, not every project looks like a nail for the PHP hammer :)
Hope that makes our point of view a little bit clearer.
@Johannes: The innovation comment makes sense indeed. PHP still evolves, but it doesn’t reinvent itself from the ground up. We will not PHP turn into node.js tomorrow.
Oh and we actually do use node.js for a project atm, but only for a small piece, the bulk is done in Symfony2.
Same here … “Uh you are doping your big site in PHP Isn’t that slow? Isn’t that the technical debt. hell? Wouldn’t you be better off using py/ruby/whatever? “
Maybe yes, maybe no! But in our case we would have to train our teams in a new language and every customer (in our case user) would have to bear with the consequences of a team changing the Platform. More bugs, less reliable architectural/design decisions .
For us it is in fact a business decision, and to be honest if hiring a external partner for a project, aligned ideas of technology is one of the most important things in this case. Especially when I look at Investments for the long turn.
Your post is valid and true. Not to mention there are two major CMS sitting on PHP in WordPress and Drupal, and they certainly aren’t going anywhere. Drupal I know is bringing innovation and progress to the web more and more with every release and I hardly see their choice of language slowing them down.
PHP: prettiest / most elegant language? Certainly not. But it gets the job done.
Great blog post. I especially like this:
“One last thing for us, why we stick to one language only, is that it was our strategic decision to concentrate us on as few technologies as possible, but to be as good as possible in them.”
… just like how Bruce Lee said:
“I fear not the man who practices 9,999 at a time. I fear the man who practices one kick 9,999 times”
I used to think like that: “PHP is good enough”. But after using Python, I would never consider doing anything in PHP again. The brevity of Python alone makes you a much better programmer.
I completely understand this argument. Some people just like to stick with what they’re comfortable with. I think it goes along with the same mindset of the 3% of people out there that keep using IE6 and refuse to upgrade… As a web developer, I always try hard to envision this scenario where a person has just absolutely refused to upgrade their browser for the last 10 years.
I think your argument has finally helped put some perspective on this.
Interesting comparison: MSIE6 hasn’t been updated in how long? Your comparison would work if we would have said we are sticking to PHP 4.3.3 or something like that. But PHP continues to evolve. Right now its still one of the best tools for the web problems, especially if you look at the entire ecosystem requirements:
– available developers
– available libraries
– available applications
– existing know how at liip
Note the last one is just one item on a list and not the sole deciding factor, its more the tipping point if the race would be close, but it isn’t. Ruby, Python, Node.js might be shiny, cleaner or more “innovative”, but for our the types of projects we do, they are not a good fit. We for example tend to involve and empower our clients to be able to do smaller maintenance tasks themselves. With PHP that is more feasible than with “insert some shiney new language here*.
This is a great article and what I find so awesome, is that I am a CFML (ColdFusion) programmer, and it would be nothing to replace every mention of PHP and PHP specific projects with CFML and CFML specific projects and have it be just as valid. As some of the previous commenters said, “use what works”.
And the biggest advantage to using PHP? human resources (i.e. many more PHP devs than Ruby/Python developers).
The semi-homosexual and compltely-failure driven culture of Hacker News will kill you. 20 year olds that never did anything, but still did in in Python are going to laugh.
It is a pathetic picture. In factm I personally made millions AFTER I stopped reading HN. Not sure if this is related. Could be.
Is there a PHP community somewhere in Switzerland? :) I often look for user groups since I live near to the Italian border, but without results.
Giorgio: We think globally and “import” people from all over the world.
For community events in Switzerland, check http://techup.ch/. There’s nothing dedicated to PHP (anymore), but a lot more general web meetings, which are anyway more interesting :)
We stay on PHP for the same reasons as mentioned in the article. However, the lack of re-use mentioned by Alexy is problematic for the community.
A couple of us got together and started Pearfarm to try to remedy the situation by reducing the barrier for sharing and finding code. There’s also Pearhub which is similar in its goals. Neither have been widely adopted, and I have always wondered why, since I think that there are so many PHP’ers out there that want to stay on PHP but have the benefits of sharing code to a greater extent than is done today.
Hopefully that will improve in the future.
Even though I can’t share your love towards PHP, I agree that your arguments are completely valid.
That makes it heterosexual, doesn’t it.
What about Java and its JSP? Or maybe I am just throwing here a huge brick into a small bath full of hot water ;-)
If PHP is a good technology nowadays or not, this I can’t judge because I’m not a specialist. But I think this is not the question (it’s a bit a childish debate, no?).
And even tough, it has been and is still widely spread for calling it “a market” worth to be in…
But what sounds pretty clear here is that as entrepreneurs, you think twice before jumping in cold water, you don’t intend to go in all directions. You focus on your specialties (not only PHP by the way so let’s call “few technologies”) and you do everything to be good at them. That’s a very wise, mature and solid strategic thinking.
I know many companies who settled into their niche market and had a long and very beautiful life. I know some others who changed their mind and core business focus at the rhythm of the seasons or the buzzwords until nobody could explain what they were for a company, what they were good at, and then nobody giving them work to do.
So if PHP would come to “die”, I would fully trust Liip for embracing a new promising technology, specializing on it and becoming good at it sustainably. On the contrary, I’m not sure I would trust a company that acts like a “chien fou”.
You just demoed that Liip is not a “chien fou” and that deserves a lot of respect (and Namics also btw ;).
PHP has only one real advantage over Python && Ruby: Hosting
PHP’s ease of deployment has led to a huge number of developers and 3rd party apps (although the number of “frameworks” is just pure insanity. Any of you writing your own, FFS don’t release it).
If Python or Ruby could fix the hosting issue, then PHP would be dead in the water IMO.
I also had similar query running in my mind, why PHP people stuck with it.
http://www.technobits.net – Always remain technically updated.
Good blog post. Yes, the choice of language should be made on usefulness and not because of coolness (e.g. Ruby).
As long as PHP is useful for all our needs we don’t have to use any other language (Unless gain > time investment).