views:

347

answers:

2

I'm new to the world of PHP frameworks and, after some initial investigation, came up with the following list of popular choices:

  • CakePHP
  • CodeIgniter
  • Symfony
  • Zend

I'm trying not to repeat the "Which is best?" question, which seems to elicit not much more than personal preference. Is this the case? Is one truly "better" than the other? What are the strengths and weaknesses of each?

I apologize if the question is too broad, but any clarification would be much appreciated.

+9  A: 

The thing with frameworks is that they're perfect up to the point you need them to do something they're not made for.

I've worked with all of the major PHP framework's you've listed, except Zend and this is what I can quickly tell you:

  • CakePHP enforces OOP, gets you up and running quickly, has a great community and relatively good documentation, comes packed with all the features you'd come to expect.

  • CodeIgniter gives you the most elbowroom of the first three. Doesn't exactly enforce OOP, it leaves it up to you. The easiest to implement and distribute of the three. Fantastic community and they keep the documentation up-to-date with new releases. I like to consider it as a perfect skeleton for whatever you want to do, how you want to do it. Also, the most fastest of the three.

  • Symfony without a doubt, the most powerful of the three and the closest to RoR. Expect having to learn PEAR and have access to SSH on remote servers. Very slow and I wouldn't suggest it on shared hosts if you want to develop a big application. It does enforce some strange practices and you'll see more PHP in your views than you'd particularly rather like, but it has a tool to help you start working on a solution for every problem.

kRON
What? Symfony is about as far from Ruby on Rails in both design and philosophy as you can get and still be a MVC framework. Cake is an attempt at a clone of RoR, but without the power of Ruby and hampered by PHP4 compatibility.
jcoby
+1  A: 

I stumbled across this (old) question as I am looking for a PHP framework that works well in a shared hosting environment ; speed is important as in shared hosting CPU time is the tightest constraint.

I found the following comparison that might give some insights into each frameworks performance from that perspective.

http://avnetlabs.com/php/php-framework-comparison-benchmarks

Martijn Dijksterhuis
**AVnet labs link is awesome**
namespaceform