PHP Application Framework Battle Royale: CodeIgniter vs. Symfony
5
2007
I found CodeIgniter yesterday and it looks really promising for a php framework. It’s very similar to Symfony but its geared towards the shared hosting crowd who wants a framework that can work with them a little better (or at all). I worked with Symfony about a year ago on a project called MeetFish and it was really cool to see how rapidly we developed the site using a framework (the awesome programmers at Agathon were the real code masters here while I did the design and a little view coding). I’ve always wanted to use Symfony on another project but was never able to because I don’t run a dedicated server and don’t have the time to figure out if it will work in my shared hosting environment. Basically, if I can’t install it in under 30 minutes, I can’t use it.
This is where CodeIgniter comes in. They claim that the framework works in shared hosting environments, and alleviates the need for the command line. In other aspects it looks very much like Symfony or Ruby on Rails but without the fancy command line auto building features (however, it looks like CodeIgniter handles some of this from php script calls).
Here is a one to one “CodeIgniter vs Symfony” comparison:
| Feature | CodeIgniter (1.5.4) | Symfony (1.0.6) |
| Footprint (including docs) | 1.83 MB | 7.84 MB |
| Performance | Never mention tweeking the server for performance enhancements | Mentions tweeking the server, lots of performance inhancements that would be impossible on a shared environment. |
| Server Compatibility | Claims to run in shared hosting environments and up. LAMP Platform Install Page |
From my experience, very difficult to set up if you can’t use PEAR to install and do no run a dedicated server (or do not have root access). LAMP+PEAR+Other PEAR Libraries (Phing,Pake,Creole…these are now bundled with Symfony) Install Page Here and Here. |
| Configuration | one primary config file | lots of config settings |
| Command Line use | no command line interface | cool command line interface to set up projects, scaffolding, crud, etc |
| Libraries | written to be loosely coupled | Depenent on some libraries as mentioned above |
| Documentation | I am very impressed with the documentation on both sides. Symfony has more, but it is a much larger project. Symfony has more tutorials and they are better, and symfony has a book |
|
| Simple Templating | both use PHP mixed with helper functions/classes | |
| Helper Functions | yes | yes |
| Cache management | yes | yes |
| Smart URLs | yes | yes |
| Scaffolding | yes | yes |
| Multilingualism and I18N support | Uses Language Files | Sophisticated i18n internationalization |
| Programming Structure | both are MVC models | |
| Ajax support | can be integrated | supports natively, and is really cool |
Overall, Symfony is more sophisticated (ie. harder to use) while CodeIgniter seems more geared to my level of programming and environment. Symfony might be good for you if you live in code day in and day out, and have a dedicated server, but if not, give CodeIgniter a try. I’ll report back after I do some real tests with CodeIgniter to give my honest opinion about how it works.
Related Posts

Comment by Ville
on 08 Sep 2007 at 2:12 am #
Thanks for that comparison; it was very useful!
Comment by Kumar
on 20 Sep 2007 at 10:43 am #
Thanks for this article; it is really helpful. Here is my two cents from a learners point of view….
I am in the process of choosing a PHP framework for our project. I have looked at many and narrowed down to Cake PHP, symfony, Code Igniter (CI) and Zend Framework due to the availability of clear documents. Then I narrowed it down to symfony and CI due their better documents.
Amongst these four, symfony has by far the best documents. They have very good tutorials, “the book”, class library documents and even user contributed cheat sheets. But, boy the learning curve for symfony is so steep; symfony has so much conventions and configurations that it will take a lot of time before you could design your project.
On the other hand, CI is so simple and intuitive that make up for their lack of detailed tutorials (they have a couple of decent screen cast tutorials). I read the documentation in a couple of days (at my pace – maybe more experienced programmers can do much faster than me) and started the design for the project.
Compared to symfony, CI seems to lack some essential features that are inbuilt in symfony: page level security based on the user role, auto generated forms with search filters and validations, AJAX and layouts for the view. You need to develop your own login, security mechanism, form error handling (you could use CI form and validation helpers though) in CI. In CI, each view is sent to the browser by itself as opposed symfony which has layouts, templates, page fragments, slots, etc so you can easily create a site with multiple segments; so in CI, you need to develop a layout structure for the view so the common parts of the webpage are seperated. There are some user contributed articles in CI wiki to help you with this though.
Now, I seem to lean more towards CI for its simplicity. But it means I have to do more coding and integration of third party Ajax tools myself.
From performance side, I felt symfony is a bit slower compared to CI for the same task of displaying a few rows from the database.
Comment by HITEC
on 13 Oct 2007 at 7:52 am #
Thank for all! it is really helpful for me.
I use CI and integrate Smarty for template, prototype for ajax, javascript and tinymce for HTML editor. I think that anough.
Comment by aboyon
on 04 Nov 2007 at 7:47 pm #
good comparison, i choice codeigniter, is easier than simfony.
Last month i was testing cakePHP & simfony and sudendly i see codeigniter and i said “it is what im looking for”..
well thanks soo much again by your comparison…
greetings! and God Bless you
Comment by Stu
on 06 Nov 2007 at 3:00 pm #
Great table. I like simple as long as you are not losing anything in the mix. Also we do a lot of CodeIgniter sites with very advanced Ajax without any problems.
Comment by gillbates
on 20 Nov 2007 at 12:40 am #
I’m building a site in symfony right now, and learning it in the process. I just took a quick look at codeigniter’s documentation, and I can immediately tell that codeigniter would be so much easier to learn. If you’ve never used CI or Symfony before and you need your app finished yesterday, I suggest CI.
That said, if you can take time to study and learn, I suggest symfony
Comment by Ian Clifton
on 21 Dec 2007 at 8:22 pm #
These are really two very different frameworks. If you are doing a massive project, particularly one that needs to scale well, symfony is the answer. If you’re making a personal site and looking to have some nice libraries while organizing your code, CodeIgniter is the way to go. Anything in between just depends. CodeIgniter is extremely easy to learn because it is so intuitive, but it is also much smaller and less feature-rich. symfony is the exact opposite: tough learning curve but features galore. I’ve run both on shared and dedicated servers. Though symfony can run on a dedicated server, I don’t recommend it (it’s slightly better if you do your developing and testing on your own box, but still pretty resource-intensive).
Comment by Sherif
on 14 Jun 2009 at 12:23 am #
Great point – I would agree with you – two very different frameworks for different purposes.. you can’t really compare the two.
Comment by Benben
on 01 Feb 2008 at 4:15 am #
I’ve recently released my website built with symfony on a shared host (no command line access, and no pear) and it worked perfectly fine.
The guys at symfony recently (about 8 months ago) created a simple command line to pack all the required library in your project folder so that deployment on the shared host only becomes a matter of uploading the files.
I think they were aware that shared host deployment was a weak point of their framework and addressed the issue quite well (to my experience).
Note that i never programmed anything in PHP prior to doing that website, but since i’m used to object programming I did find the symfony approach quite natural.
Comment by BorisK
on 14 Apr 2008 at 7:28 pm #
Expression Engine 2, which is due this summer, will sit on top of CodeIgniter. EE is compared to Movable Type more than often. Having such a great product would bring many people over to CI.
Comment by pitrasacha
on 27 May 2008 at 12:14 am #
hey .. nice comparasion ..
FYI : symfony running well in shared hosting
just use the symfony freeze command, everything done
Comment by James Ehly
on 27 May 2008 at 10:59 am #
I have heard that people are running newer versions of symfony on shared hosts. This is pretty exciting and I hope to have time to test it out.
I’ll take this into consideration, I’ll update the post once I get a chance to test it.
Comment by ken
on 30 Jun 2008 at 11:08 pm #
using symfony in a shared environment is just a matter of freezing, uploading and modifying include paths in the front controllers, very easy
Comment by application
on 30 Jul 2008 at 8:01 pm #
He failed to mention that Codeigniter trumps over Symphony on:
Learning curve
Ease of deployment
Flexibility of hosting environments
PHP syntax even if it’s off in your PHP config
Lack of extraneous garbage
Speed of creation
non-overgrown documentation just for the sake of being large
Comment by halwaraj
on 03 Oct 2008 at 10:59 am #
Hey good man, you resolved alot of my issues. Thanks. Namaskara maga.
Comment by Connor Denman
on 11 Nov 2008 at 1:03 pm #
I find Symfony to be a powerful framework, even though I like codeigniter better and I use CI for most of my projects. Although, I find Symfony’s data schema.xml thing very unproductive and just plain unnecessary. Codeigniter has many good and bad features just like Symfony, but CI gives the developer more freedom (not taking over the whole application), so that they can create as simple or advanced of a web application as they want.
Comment by mikemike
on 11 Nov 2008 at 7:20 pm #
Code Igniter rocks. It’s so light weight, and it’s the easiest frameworkto learn in any language period. There are very few issues with compatibility anywhere ever on any hosting environment, and when there are, you just google the error code, or google site:codeigniter.com example error and you’ll find a fix instantly. I had a problem with my clean URLs not working correctly on Media Temple hosting (Because of their weird Apache configuration), and I found the fix in like 3 minutes.
Comment by gorgonzo La Pizzo
on 04 Feb 2009 at 10:21 am #
symfony is a total mess and bloated like hell – leading you to a oneway trip to dependency to darkness and evil bullshit will fill your brain. CI is made by sane people that have light and good working brain. go even better with kohana and if you have good experience with php and like better spending time licking your girlfriends cunt and not learning meta meta bullshit than go CI or cohana or if you like speed go to yiiframework. symfony is like a lame duck with br0kn wings and only for people who did not look on different worlds like php. go feed your cilliak to produce some more milk into the framework drombadtz!
Comment by Newbie
on 08 May 2009 at 11:53 am #
Hello,
I’ve personally been using a combination of CodeIgniter and Kohana PHP framework, Codeigniter for my front-end and Kohana for the back-end of my website, both have their pros and cons.
However, performance-wise I feel Codeigniter is not so bad, serves the purpose, simple and easy to get going. Nonetheless, as one person put it, you need to do alot more coding to get your project in shape but sometimes flexibility can be a useful attribute.
Pingback by Symfony V/S Codeigniter |
on 02 Jun 2009 at 6:56 am #
[...] I found another interesting comparison of these two in : http://www.devtrench.com/codeigniter-vs-symfony/ [...]
Comment by dazz
on 06 Jun 2009 at 1:20 pm #
I coded for the last three month with symfony, the learning curve was high, but i got it with all those tutorials and examples.
Two days ago I needed a small Application for worktime-tracking and I did everything in two hours. Yeah!
Now I’m sitting here with a new project for a customer and they chose CodeIgniter and I am frustrated all the time. It’s so lightweight that it’s hard to spot any benefits I could get with this. There is no standard solution for anything and the documentation lacks examples big-time. I have to do everything by myself. With stdClasses there is no codecompletion and I wish I could have some comandline.
On monday I will definitely show them how smart and fast Symfony is.
CakePHP is out, because it’s much to circumstantial to change something if you already started coding
Comment by gillbates
on 07 Jun 2009 at 9:21 am #
so true, I miss code completion with Codeigniter too
Comment by mikemike
on 07 Jun 2009 at 1:30 pm #
Not true guys. The only thing CodeIgniter doesn’t offer is a full ORM API. You can perform FTP, XML-RPC, Database, URI Parsing, and the list goes on for miles with CodeIgniter.
Comment by joelwallis
on 13 Jun 2009 at 9:50 pm #
Thanks for comparing. It is very very useful!
I have used CodeIgniter for myp projects, and i wish to know more about Symfony, because some friends tell me about you sophistication, but CodeIgniter supply all my needs.
It’s a very powerfully framework.
Comment by Sherif
on 14 Jun 2009 at 12:21 am #
Hey There,
I recently did a comparison of PHP web frameworks. Interesting to read your results. Good write-up btw. A couple of things that might be slightly incorrect/debatable:
1) About Symfony: “From my experience, very difficult to set up if you can’t use PEAR to install and do no run a dedicated server (or do not have root access).”
Symfony can be very easy to install with no “root” access required. You can install Symfony via the Symfony sandbox – one Zip file, download and install. The option is there
2) Ajax – Syfmfony “supports natively, and is really cool”
It does use third-party (prototype etc…) for it
In my comparison I concluded:
* Symfony is excellent if you are planning to use it for large sites. Symfony being used by Yahoo! in particular delcious.com as well as providing cache mechanisms with memcache make it a winner
* Symfony is very good for multiple developers – it enforces standards, allows users to work in parallel on different modules.
* Symfony is probably “overkill” for a small site with one developer.
* Symfony had a much bigger community out of all the PHP frameworks (I checked the forum size, developer lists etc…)
I would agree with your statement that code Ignitor is “easier” than symfony. Easier probably isn’t the right word for this though. The learning curve is *far less* than Symfony.
With that I would say that is the case because they have two different purposes. I think Symfony’s target audience is for the much bigger sites with multiple developers, looking at a component-based framework. Where as code igniter is more focused for the “freelancer” type of developers.
They both serve a purpose…
Comment by Steiner
on 09 Aug 2009 at 1:40 pm #
Can’t help but add my opinion on the topic…
Truth is I’ve used CodeIgniter in large-scale situations. One being a series of game fan site Titan Network.
It’s be EXTREMELY helpful in expediting the development and over-all modularization of adding new things. Though most MVC frameworks have these same benifits… I honestly think the CodeIgniter is for the knowledgeable PHP editor that knows their way around implementing their own classes and securities in a manner that the users and peers can enjoy.
We have 5 volunteer developers right now working on Titan, and they honestly couldn’t fathom using anything else.
I’ve used Symfony on 2 occasions and both were for professional-grade intranet sites utilizing LDAP. I can’t say I honestly liked how much work had to go into the back-end before the site could be developed.
There is no “flow” to building a Symfony site, just a rigid set of tasks, and a series of hopefully avoidable meltdowns, lol. No I was not so lucky.
And regarding the documentation… let me put it this way… Gateway computers was the #1 computer company for customer service for about a decade!
Of course they are! Their computers always break down and have millions of people calling over the other companies who don’t have nearly as many issues, and therefor calls… automatically dropping their average in this horrific census.
I put any script that needs a “book” to explain how to use it, in the same pool of thought. Framework is supposed to be… the smart phone to the work-a-holic, not a completely new approach to developing an existent script language.
Lol, CI FTW! I’m sorry if anyone disagrees with this, but CI will always be the better choice imo. All the cons stated above for CI, one thing caught my attention… “Server Tweaking Enhancements”. The reason they don’t state it, is because it loads over 30 included files, parses the Controller, Model and View for each controller call and passes it to fruition in less than 2 seconds on a shared GoDaddy host. There is no need to enhance on perfection, lol. Just don’t go auto loading classes you don’t need for every page, lol.
Pingback by PHP Made Amazingly Easy, Efficient, and Fun With CodeIgniter : Performancing
on 11 Jul 2009 at 10:27 am #
[...] framework like this. There are alternatives like CakePHP and Symfony. (Several bloggers have posted great comparisons of each framework.) I will admit that I have not tried those yet (I based my decision to use [...]
Pingback by The importance of a well-documented framework | jigniter™
on 25 Jul 2009 at 11:32 am #
[...] There are some other external articles that also mentioned CI’s documentation, tagging it as "excellent” (Notes on choosing a PHP framework round 1, round 2, CakePHP vs Zend Framework vs CodeIgniter, PHP Application Framework Battle CI & Symfony). [...]
Comment by James Ehly
on 10 Aug 2009 at 2:56 pm #
Thanks for sharing. I think this is all really good advice.
Comment by WizOne Solutions
on 09 Sep 2009 at 3:04 pm #
Great comparison; I was thinking of using Symfony because I’ve seen job ads for it, but maybe I’ll learn CodeIgniter first and “size up” to Symfony if I see the need for PHP frameworks.
I”m honestly a CMS fan myself (Drupal), but I guess sometimes a framework could be a more flexible way to do things that aren’t as easy to do with a CMS.
I like CodeIgniter’s Web site more than Symfony’s; it’s got a nice community feel.
Pingback by 40+ CodeIgniter Framework Tutorials for Kick-Ass PHP Application | PHP Frameworks
on 16 Oct 2009 at 4:05 am #
[...] 33. PHP Application Framework Battle Royale: CodeIgniter vs. Symfony [...]
Pingback by 40+ CodeIgniter Framework Tutorials for Kick-Ass PHP Application | Son Of Byte
on 02 Nov 2009 at 11:30 pm #
[...] 33. PHP Application Framework Battle Royale: CodeIgniter vs. Symfony [...]
Pingback by 43 ??????? ????????????? PHP ?????????? CodeIgniter | Vizor-IT blog
on 28 Dec 2009 at 12:09 am #
[...] PHP Application Framework Battle Royale: CodeIgniter vs. Symfony [...]