Home > Uncategorized > Kohana vs Cake vs Zend vs CodeIgniter vs Symfony

Kohana vs Cake vs Zend vs CodeIgniter vs Symfony

A popular question asked all over the internet is – “Which PHP framework should I choose?”. The likely candidates are Kohana, Cake, Zend, CodeIgniter and Symfony. There’s a very simple answer.

How are you prepared to learn this new framework?

  • Cake: Good documentation, examples and community support.
  • CodeIgniter: Good documentation, examples and community support.
  • Symfony: Good documentation, examples and community support.
  • Zend: Good documentation, examples and community support.
  • Kohana: Limited out-of-date documentation, limited examples and limited community support. If you want to learn Kohana you will be expected to read the source code until your eyes bleed and you’ve followed so many magic functions that you’ll need to understand the major changes between PHP v4 and v5 and which ones Kohana has built its framework upon. It’s really fun tracking down functionality built on magic functions because there’s no text string to search for, such a useful way of spending hours on a Saturday afternoon. As long as you’re an advanced PHP v5 programmer and understand the intricacies of OOP you’ll have absolutely no problem picking up Kohana.

However, if you actually want to use a framework that’s easy to learn and makes your job easier of building that web application, you’d be better choosing any framework that doesn’t start with ‘Ko’ and end in ‘hana’.

I chose Kohana. Some days I regret it, some days I love it and sometimes I hate the arrogance of the Kohana developers that think it’s good to read the source code. Sometimes I feel like I’m simply stuck with Kohana because I’ve spent far too long learning how it works to go and pickup another framework. I think this anger is what makes so many other Kohana developers so belligerent when we post on the forums – maybe I’ll be like them one day too … when I’ve put in my time.


I didn’t realize that my flippant and somewhat exasperated post was going to be so popular on the Intertubes. Therefore, I feel a little obligated to actually help.

There are some much better reviews of the PHP frameworks around the Internet, some that go into excruciating detail, some that compare performance but most are biased. In fact, I’m not even going to bother wasting your time by giving you the links. I read them all before I chose Kohana and all I ended up with was more information and more confusion.

There are strengths and weaknesses to every framework and the best framework depends on what you want your application to do. However, do you really want to learn all of the frameworks? Thought not, you just need to pick one.

Code Igniter and Kohana are bare bones frameworks, they supplement PHP, support everything that you *should* be doing with a web application but little more. Code Igniter’s documentation kicks Kohana’s butt all day long and from one coast to another. This is probably why the community is larger and it’s easier to find the answer to your problem. However, it’s not as slick as Kohana or as modern but you’re at the whim and mercy of a few developers who don’t really care about making it easy. There is a level of arrogance and ‘leetness’ with the Kohana developers that comes with the territory.

Both Code Igniter and Kohana require the developer to have a good understanding of PHP. You almost need to understand the limitations of PHP to see and appreciate the value in Kohana or Code Igniter. I ended up with Kohana because I sketched out my own framework and found that around 90% of it was already done with these two.

Cake, Zend and Symfony are for the less hard core programmers. People that want to get a project done quickly, are not bothered about blistering performance and value good documentation. These frameworks are all very similar and good products with excellent documentation and support. But there’s a little more overhead than Code Igniter or Kohana.

My recommendation for anybody wanting to consider any of these frameworks is to look at your application, break off a small piece of it and code it in all of the frameworks. How easy is it to configure the framework? Connect it to your database? Do some error handling, logging and create a few views? How well does it handle form validation?

A lot of the frameworks use a blog as an example application which may or may not be realistic so be careful. I’d also recommend looking inside the framework and the source code. Every time I’ve installed a PHP script during the last 10 years there has always been some point where I’ve had to read the source code, maybe it was a bug, an error or something that wasn’t clear in the documentation. It’s only when you see what’s under the hood that you get a better idea of the engineering quality. Is it commented? Are coding standards applied? Does it make sense to you? Pick a method, say the database connection method, how does it actually work? How many files do you have to track through to understand how it works?

  1. September 5, 2009 at 4:13 pm

    Bloody good post! First class advice. Not a ‘my framework is better than yours’ analysis – actually some really good tips about how to evaluate a framework that you are considering. Thankyou! 🙂

    • December 7, 2009 at 2:18 am

      I’m try to use Kohana now. But I have already used symfony in a quite complicated project. I’m not sure Knohana can beat symfony’s strengthens. Lightweight, performance, functionality or security? I found symfony has done them all well.

  2. January 5, 2010 at 4:24 pm

    I’m using Zend, but felt same thing, that its over loaded FW. but I’m thinking about performance and reliability. Mine was portal which handles more than 100000 pages and user contributed data. Please any one can comment regarding the performance.

    • January 22, 2011 at 9:07 pm

      Do not worry about the size of full Zend framework library. First, it is easy to use autoloading of classes so anything not needed is not loaded. And second, if you use ZF not as MVC framework but as a useful class library you can copy classed you need (and their dependent classes) to your project’s folder and avoid using the complete ZF. And if you apply some optimizations for sites/apps with high traffic with Zend_Cache and on database level you can boost the performance and lower server load significantly so use of a framework itself will not affect the performance.

  3. January 20, 2010 at 12:00 am

    Great article, this is the second time I’m getting onto it from Google. I’m using KohanaPHP 3 after Zend Framework and CodeIgniter, it’s pretty good.

  4. April 2, 2010 at 9:17 pm

    I just took a look at Code Igniter. Let me say. The name says it all. You should take a flame to your project and torch it if you decide to use this framework. It’s not even PHP5/OOP. It looks like it was created by some .NET idiots who think they know programming. Controllers? Application folder? WTF? Zend all the way baby.

  5. sheldmandu
    April 8, 2010 at 4:16 am

    I did some comprehensive performance benchmarks of all the latest PHP MVC Frameworks including Yii 1.1.1, Kohana 2.3.4 and Code Igniter 1.7.2 as well as others. The results and analysis of results is here: Comparing PHP MVC Framework Performance

    • Admin
      April 8, 2010 at 8:43 pm

      Interesting comparison. It also highlighted some other good frameworks and made me re-look at the whole world. I like the look of Kohana 3 but I just wish they’d fork it from the rest of the v2 brigade and their superiority complex.

  6. May 17, 2010 at 8:27 pm

    Very nice comparison, good advice. Personally I love Kohana, because I love OOP and magic functions. I like its modularity and cascading architecture. But I agree with you, the documentation needs a real work-over. Next time I use it I’ll make sure to fill in any gaps I find in the docs (as should and thankful developer. It’s the cost of open source software). I don’t particularly mind reading source code, so it works great for me. I just love the clean feel most of the code has. I can USE it, rather than conform to it. However, I have yet to use frameworks other than CI and Kohana (and Joomla, Drupal, and WP, if you can count those as frameworks), so I’m not sure how “cleanliness” holds across other frameworks. I’m about to use cake, so we’ll see how it goes.

  7. aNDREU
    May 18, 2010 at 11:22 pm

    another vote vfr kohana here

  8. September 1, 2010 at 3:43 pm

    Great post

    Having used Kohana for the past couple of years I feel the same way. The willingness of the community to break backwards compatibility with previous versions means that in my opinion it is not the right choice for a business environment.

  1. January 26, 2011 at 4:45 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: