PHP Framworks !! Why , when and which ?

Well!! I know it’s been a long time, but what to do so many things to do and I’m having hard time to maintain this blog these days.Hope I will be regular like I was before. Today, I’m going to talk about some of the popular MVC PHP frameworks. A few people has asked me what is CakePHP, or What is CodeIgniter? How to to use them ? When to use them ? Today, I’m going to talk about PHP frameworks which I’ve used. Please note that the choice of choosing a framework is personal preference and the statement and this post is not going to say that this framework is better than this framework.

What are the benefits of using MVC PHP frameworks ?

Well there are many benefits of using PHP frameworks, let’s see some of the main benefits of using them.

  1. They PHP frameworks follows some design pattern, so when you use these framework you’ve to follow their coding convention which makes your code clean and extensible for future purpose.
  2. The Popular PHP frameworks like CakePHP, CodeIgniter, Zend Framework , Symfony follows Model View Controller(MVC) design pattern which separates business logic from user interface making the code cleaner and extensible.
  3. As everybody can guess, these frameworks contains a lot of libraries to make your job easier. For example, to validate a from you don’t have write much code as you’ve to in normal coding scenario, just few lines of code calling the library might be enough for it.
  4. While working on a large project in a team, these MVC PHP framework will be a great tool for development as you can assign a developer to develop MVC part of a module for a developer and integration will be quite easy of these developed module at final level.
  5. These MVC framework will really helps you to develop the project rapidly, if you know one framework well then you’ll never worry about the project deadline.
  6. Most of these MVC frameworks uses clear url approach making your web project SEO friendly.

Furthermore, if you want charge money to visitors who download or access content of your website then this software is highly useful.

What are disadvantage of using MVC PHP frameworks?

A coin has two parts similarly a bright stuff always have dark part as well .

  1. Different framework have different coding convention, Depending upon the the framework, you’ll have to learn coding convention for the framework you want to follow. So depending upon the framework, it might to struggle at the beginning.
  2. While coding using these framework, sometime you’ll not find any library or helpers which might be useful for you so you’ll have to struggle bit at that time.
  3. If you don’t have OOP experience then PHP MVC framework are not you. First build a solid knowledge of OOP with PHP then only think about choosing any framework.
  4. PHP frameworks are not for the small projects from my point of view, because in a very simple project custom coding will work faster than setting up a framework.

Which framework should I choose?

This is the one of the most discussed question about the PHP framworks. So it depends upon particular person and project which framework will best suit for you. But depending upon my experience, I can show you some way to choose the framework.

  1. If you’re just want to use MVC framework for your next project, then I suggest you to go for CodeIgniter. It is very easy to learn and well-documented.Furthermore, it’s very flexible because it is not so strict on naming conventions etc. Furthermore, Model is optional while coding in codeIgniter so it is not necessary to use model for each controllers.
  2. If you’re coding architecture savvy, then I suggest you to go with CakePHP, probably the most popular PHP framework but I must admit. This framework’s coding style is similar to Ruby on Rails and naming conventions are strict in this framework.So if you’re working on a huge project in a team then this project will be the right choice for you.
  3. If you’ve to use a lot web services external APIs in your project then Zend Framework will be right choice for you, it contains huge libraries for external APIs compared to any other PHP MVC framework. The main benefits of this framework is that you can use them as components(without using MVC) in your project or you can follow Zend framework’s MVC architecture to develop your project. The other benefits of this framework is that you can use it inside any of the above two MVC frameworks. And, this framework one of the most favourite of people when I conducted the poll for the best PHP framework ?

25 thoughts on “PHP Framworks !! Why , when and which ?


    Greetings to everyone!

    Can I ask something? (yes..)

    Is there a way in PHP where you can determine if a certain email really exist? The email may appear valid, but how can I know that it’s real and existing?

    thanks in advance guys…

    (sorry if my question is not related to this post)

  2. @above question – you can only validate weather the domain name related to email is valid or not .. but there is no way in php to check weather that email does really exist or not until you send an email to that mail address….if that email get bounced then you can use bounce handler to check weather the email send to the email address is bounced or not…



  4. Firstly thank you for this great article. I found some answers in my mind. This framework only allow you to use php or can we use php+mysql on this frameworks

    @Roshan & Questin Fron An Idiot:
    You told that “there is no way in php to check weather that email does really exist or not until you send an email to that mail address.”
    It’s possible
    Check here


    thanks SNaRe.. i’ll scheck it..


    I ran the script, but it keeps on saying that my supplied email is invalid even it’s my own email.

    Can someone help me please..
    Here’s the script from :

  7. well even this script actually verifies that the server exists and has a mail server listening. it can’t verify that the address provided exists. in other words it can verify that exists and has a mail server (obviously!) but it can’t verify that is a valid address.

    @question: where you are running the script is there an internet connection availiable?

    ontopic: i recently started using codeigniter and i actually thing it’s great! saves you from alooooot of coding and troubles…

  8. @snare & @a question from idiot – please check that code properly it is just verifying the domain part of email not whole email…

    I take my words no way to validate email address , it’s actually possible via consecutive fsockopen connection to handshake smtp server and validating the user name with smtp server… but believe me a tough task becuase you’ve to know each and every command of smtp handshake….

  9. I find it interesting that two out of the three frameworks you recommend still are PHP4 frameworks. Not very good if you ask me, as PHP4 is dead.


    thanks everyone for the replies…


    can i ask again?

    is there a way or function in php where i can extract a certain number of characters from a string and store it in a new variable?

    for example, a string variable x has a value of = “the quick brown fox jumps over the lazy dog” how can i extract 10 characters from the string? is it possible? ( a question from an amateur)


  12. Thanks for the quick rundown of the pros and cons of PHP frameworks. I do have to say, though, that it would be easier to read and follow with fewer typos and misspellings. I realize that no post is perfect, but this post had an error nearly every line.

  13. christoph

    great article. again. pls correct the codeigniter-link, you got 3 t´s in the htt(t)p. :)

  14. Another vote for Code Igniter. Cake is way too slow to be used for any major project. Code Igniter gives you a flexible framework, which doesn’t force you to code a certain way.

    Zend isn’t really a framework imho. It’s more a compilation of helper functions combined together with a routing class to help you on your way. One could completely bypass the MVC in the Zend framework, thus making it ‘invalid’ as a framework.

  15. Chandra K

    @ question from idiot
    substr() is for you… and don’t forget download PHP Manual, (CHM flavour is recommended),and read it…

    @ Author,
    nice i’m currently researching about CI, great framework… how come the CMS isn’t free?

  16. someone

    For a clean, quick, simple, and well done MVC base, checkout TinyMVC

  17. @christoph- thanks for the quick eye man…..

    @ChimericDream – thanks man for suggestion…I’ll try to reduce the error as much as possible in future. I’ve made this post in a hurry so might have many typos and error I’ll correct them soon…

    @Stefan- I think you know that cakephp and codeigniter has support for PHP4 as well as PHP5 so you can’t call them PHP4 framework. And believe me, they are widely accepted PHP framework in the community. PHP4 is dead but death of PHP4 doesn’t mean that these framework are not good at all.

  18. I use my own custom framework – iFrame

  19. Charles A

    While it’s true that not all frameworks do everything, I work for a telecommunications company and we needed an MVC framework that could give us fast pageloads and scale with our architecture.

    We tried Codeigniter, Zend and Symfony but they couldn’t get past the 15 second page load barrier (mind you we have thousands of customers worldwide who use our web tools and use a 10 terabyte backend database).

    So we tried PHPulse and this became our longterm solution. It’s benchmarks blow other frameworks out of the water and it has built in Ajax via jQuery as well as built in templating with Smarty.

    It’s why they advertise PHPulse as the fastest framework for PHP.

  20. hi good thank you master

  21. Nice Post, I love working on cakePHP and codeigniter but only for big applications.

  22. Muiko

    @Charles Phpulse is not the fastest, I actually found out this new framewrok call DooPHP which is a lot faster than others, and I have been doing simple benchmark on it, it’s truly promise high performance unlike other framework which just providing fake/misleading information.

    I am using DooPHP with Zend framework since they share the same license (new BSD).
    You can check it out at

  23. lucky

    Hi ,
    i just want to know about the details tutorial on CodeIgniter framework can you help me to built a project in this frame . If you have any type of demo project on codeigniter please forward me to my mail id and also some useful tutorial on CodeIgniter.

    hope you reply me soon.

  24. Nice, but I’m using my own framework which follows MVC pattern and I made it cause I didn’t like frameworks like CakePHP ori Symphony, cause they are very ridiculously (my 2 cents)

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>