Which is the best Php-Framework by your opinion ? And which is the best way to learn this Framework?

Hello php developers.

I made a research about my quesiton. But i would like to know, which is the best Php-Framework by your opinion ? Because all opinions are important for me.
And which is the best way to learn this Framework ?

Thank you,

What has your research shown you so far? As it would be ideal to know what you have discovered up to this point and what has been the influence of your discovery too. What criteria did you focus on in your research, what is important to you in a framework?

My criteria are :

  1. Security
  2. Popularity and community size.
  3. Sustainability
  4. Easy to learn
  5. Ease of Installation
  6. The smallest Learning Curve.
  7. Core Library

Could you help me more, sir ?

if you rely on any framework you will create a project for a short time, you will not be able to maintain it, cause if a new version of the framework release, something break and you have either to stick to a specific version or spend a lot of time to rebuild parts of your application.

my solution would be learn PHP, understand OOP and Design Pattern take a look at architectures like Data Context Interaction, Use Case Driven Design, Clean Code, Hexagonal Architecture, Onion Architecture.

Then build wrapper for your logic with Framework parts inside

1 Like

@BlackScorp - can you define “short time”?

Symfony 2.3 was released May 2013 and will continue to be supported until May 2017. 4 years seems a reasonable amount of time especially since the code itself won’t suddenly stop working.

In addition, S 2.7 is on track to be released in May 2015 and supported through May 2019. There will be no bc breaks between 2.7 and 2.3.

Is 6 years considered to be a “short time”?

@ahundiak just because they support it, doesnt mean that that public api of any classes will not change at all. with supporting means that they will add patches, but with short time i mean that some kind of class or method somewhere can be changed

A good way to start is usually to check out the documentation - many frameworks have ‘getting started’ tutorials that will step you through making a simple blog or something. It also depends on how you prefer to learn - some people find video tutorials better than written ones, or vice versa.

Personally, I find it helps if actually try to build something when learning a new framework or library… having a clear goal in mind motivates you to find out how to do things, and you’ll remember more of what you code than what you read.

This reminds me of the maxim about the three options for software development “cheap, fast, good - pick two”. It’s probably not possible to find a framework that meets all those aims, so you’ll have to think about which are more important to you.

Are you wanting to learn for interest’s sake (for a hobby or whatever) or for your career?

@BlackScorp - In the case of Symfony 2 the developers are committed to making NO bc changes at all. And so far, they have delivered.

Once again, can you define “short time” within the context of this question?

@ahundiak dont mistunderstand me, iam not against frameworks, i use them my self as well, i told just dont rely completely on them. even 6 years, i had to maintain and bugix projects made with SF1 and ZF1 there ARE projects outside there which are more than 6 years old .

even now, iam working with silex 1.2 and tested silex 2, i understand BC has to broken as some point, thats totally ok. a framework is not a holy grail of software development, that was my point, if you understand PHP Good enought and youre able to apply architectures then you can switch the frameworks/parts of them even with BC and has less to maintain

I have to disagree with you partially here. In this day and age I believe that responsible engineers use tried and true solutions to problems like well-known open source frameworks and libraries. The reason being that most of those solutions are well-tested, have a large community behind them, and pretty good documentation. Therefore, unless you are building something that only ever you will maintain (unlikely) the barrier for entry is increasingly smaller for engineers new to specific projects. Especially, if those engineers are familiar with many of the tools being used. For that reason I think it is pretty stubborn, short-minded and I would go as far to say unprofessional not to be using all these great tools that are available these days from frameworks to specific libraries to full fledged content management systems.

The only exception to that rule are projects that truly are unique and don’t really mend well with any open source stuff that is out there. Though I would say for 90% of the projects out there open source frameworks and content management systems are more than capable of handling a job much better than anything that is fully custom built is. Those whom don’t believe so are just not looking and spending enough time learning about what is available and source code itself behind this stuff. Everything has it’s problems but I tend to believe that the tried and true software out there has much less. More often than not is more flexible than those crying about how hard it is to do something like to advertise to advance their amateur agenda of doing things all themselves even though much better solutions exist out there. I’ve used several different frameworks and content manage systems with some pretty specific project requirements. Never have I been “unable to do something”. I’ve had to dig through source code and what not in some cases to figure it out but rarely has anything been impossible to accomplish like those advocating for all custom code like to make others believe. It is just a matter of getting some balls and going behind the documentation to the code itself.

That said while you may think your custom code/framework is all great and dandy the chances of someone else having to work with it is highly likely. When they do they will probably think the exact same thing you think about solutions you didn’t create – hard to maintain, etc. However, I’m willing to bet there is much less people besides you that know about your custom code and very little documentation. Where as if open source was leveraged there would likely be documentation and ecosystem of resources lowering barrier to entry for project newcomers. Which correlates from a business perspective to likely less bugs, quicker turn-around times, and narrowing of skill set(s) when looking for new employees.

I would also disagree with you here as well. I would say a framework is the “holy grail” of software development. A framework implies that there is a tried and true system in place to carry out repetitive and similar tasks in a consistent, DRY manor. Whether it be open source or closed/custom writing a large scale website or application without those things in mind is unprofessional and amateur.

As far as the original question goes there isn’t any single great framework. It all depends on what needs to be done in the end. I think many in the PHP world would agree that currently Symfony and Laravel is at the top of the list. How to learn them? use them in a project and start reading the documentation any open source framework worth using is going to have good to immaculate documentation. That tends to be the reason why people start levitating to one solution over another in the first place both Symfony and Laravel are no exception. They both have great documentation. If I were to recommend one though I prefer Symfony cause it isn’t just a framework it is a ecosystem of reusable components created by some of the top minds in the industry. I also think the Symfony documentation exceeds the quality and detail of Laravel.


First of all ,i also use Frameworks, especially the Symfony Components.

You say that a framework is the “holy grail” of software development. Lets beginn with the Usual MVC Approach of the Framework, if you take a look at the MVC Approaches of other Programming languages like Java or C# you might see the difference there.

MVC is a design Pattern to Seperate Logic, Data and View while in many frameworks people just create blindly new instances inside Controller fetch some kind of data and put entire Model to the View then they start call Models methods inside the view. At the end you have less Architecture but more a mess. Some ppl says then “well my controller is too fat lets move the logic outside controller into Models or Views” and move the problem then.

The Problem is, many people read the docs see example code and use them then directly like in the examples.
Also MVC cannot be made in a stateless enviroment like HTTP you have to rebuild the entire application state at the beginning of a request. But still the frameworks create a neat basic folder structure to start quick with my application.

Next is the testability, using a framework only, people get quick the feeling that it takes “too long” to develop with tests. because every change they do, they have to change many tests(in case of controller testing or view testing) if they split the things down to smaller units like Eloquent Model they might still have some bugs on the page because then they test the model but not the logic of controller.

If your entire logic is inside a controller or model or view for a specific route, you have to execute the entire framework bootstrapping just for the test. I think i dont need to mention here how nessesary tests are?

And the backward compability, well i worked on projects which are very old, back in the time, they had also a fixed backward compability. The think is, it doesnt matter how long the support is, in fact there is a time limit. the Project i worked on, tend to be quick shots, my employer told “well we thought we need a quick tool back then, now we figured it is more usefull and just require some more features” at some point you will either stuck on a framework version or have to rebuild the entire project because you put everything inside the framework specific places.

As i told i use framework because of DRY there are so many smart people outside there, they already created cool components and with the help of composer i can install them easily and use them.

I would like to Quote Uncle Bob here “date the Framework, dont marry it” Source: https://www.youtube.com/watch?v=asLUTiJJqdE

Conlusion: if you know the software architectures, not design patterns like MVC, then you can use any framework, you can switch to any version in short time, you can test your businesslogic without framework bootstrap and with the framework bootstrap(to test if the current framework version actually is working) the ability to maintain a project over long period of time is more usefull than create a greenfield project with a framework.

1 Like

Codeigniter is the best framework if you are new to frameworks; it is based on MVC approach. There are several benefits to start with Codeigniter. It is open source and very easy to learn. It simplifies the PHP code. It is easy to make interactive websites with Codeigniter.

I don’t think we need to restart a year old topic…

1 Like