There are too many PHP frameworks out there. It's confusing, isn't it? It's difficult to have a neutral opinion when reviewing CodeIgniter, Laravel or Symphony. Not forgetting the ones that use only composer packages.
I am aware there are other PHP frameworks but the list is huge. It is impossible to compare them all. If we compare the framers it may help you decide which framework better fits your need. I get a lot of questions asking my opinion about which one is the best. It is not a straightforward answer. If the questions asked were more specific; I could provide a specific answer. For example, which is the most famous PHP framework? The answer could be Laravel, which is the fastest to learn. CodeIgniter which is the best for easy performance. Falcon which is the most extendable, or even Symphony. Understanding that different frameworks solve different problems is key.
I was recently asked by a Graduate PHP Developer,
"Brendan I get it. Let's say you have to choose only one framework to learn for a project at work, which one would you choose?"
This type of questions is very difficult to answer, the answer is always, it depends!
Too many people have the same question. I will go through the frameworks alphabetically. I will not choose which one is the best one. I am a critical search consultant and spend my day talking to developers who work on PHP and PHP frameworks. Everything I say is my personal opinion. If you disagree with something that's okay. Leave a comment below explaining why. I am not a developer.
One of my favourite frameworks out there is CodeIgniter. Chances are that you've already heard of CodeIgniter. It is one of the simplest PHP frameworks out there that you can use. That's true, the supporting documentation is huge. It has been a while since this framework was refactored. You can find many questions answered on Stack Overflow. You can find the answer to anything. If you have a problem with CodeIgniter, Google will become your best friend. Google knows everything. CodeIgniter is often learnt by beginners. It allows you to understand the power of using libraries which are easy to use and powerful. You need to be careful, it is easy to create too many lines of code for something that could be done differently. Last but not least, CodeIgniter has really fast rendering and performance. It has a smaller footprint in comparison with other frameworks. Use Code ignitor if you are a beginner and you really need to learn a framework very fast. Beneficial if you don't want to install a composer on your local machine to start coding. If your business is an SMB and you need to have a fast start to your project. You can start to deliver value in the fastest possible while having complete functionality in CodeIgniter. Have in mind, it will be difficult to extend the framework in the future if the development team gets bigger. I love talking about CodeIgniter because it is a stable and fast framework. I'm suggesting it all the time to those who are looking to begin their careers in PHP development.
The next framework is Laravel. My experience is this seems to be a framework that developers either love or hate. Most developers I speak with are loving it because the code is clean and it follows good practices. It is also the most famous framework out there and you can find plenty of libraries to use. It seems to be one of the preferable frameworks companies are using. I have also had many a conversation with developers who hate it because it is harder to learn. Some have said they find it is slow. The slow part may be true. If you using PHP 7 and use good practices in Laravel, you will see a big improvement in the performance of Larval. If you would like a lighter version of Laravel I would suggest the mini framework Lumen. I don't want to extend my opinion on Laravel as you can find plenty of article talking about it. In summary, use Laravel if your business can afford the learning curve and you want clean code. Laravel requires the latest technologies and endorses the best practices on programming.
Falcon is one of the fastest frameworks out there. The framework is built with C and that's the main reason it is super fast. This framework can be difficult to use as the documentation is not as easy to read in comparison with other frameworks. I remember a Developer said even he was not sure if it was the documentation was poor or if it was the syntax to use it was poor. I guess it probably doesn't sit very well with developers to have to write extensions in C, who knows. Don't get me wrong, Falcon is a fantastic framework and it does the work very well. It's very fast and it seems to be a very stable framework. The impression I get from the developers who use it is they never have any major issues but it can be a struggle to configure it. If the performance of a server is the number one priority for you, then Falcon is the best solution that you can get, as an MVC PHP framework.
If you are an experienced web developer in PHP you will have heard about the slim frame. Most developers I speak with know of it but have never worked in a company using Slim. It is a very good framework to use if you need to start fast and you have a plan that requires you to have a unique architecture for a project. Slim is used by more experienced developers. It gives complete freedom in the way you use it and allows you to use it your way. That simply means that if you don't know what you are doing, you will probably end up with too many lines of code. Slim is a very good and light framework but I wouldn't suggest it for junior developers. I would suggest slim for an experienced PHP developer who likes a simple and light framework or if they need to create a very fast demo project.
Next on my list is the Symfony frame. Symfony does great work when creating libraries with very good documentation. Yet to use Symfony as your primary framework is not that simple as it is a huge framework. If you would like to work on a simple framework to start off there is the mini framework called Cilix.
Zend seems to be a favourite framework within the development community. While deemed complicated and poorly documented. Zend is a huge monster but the libraries are unique and fully extendable. Enterprises use it for the database connections, the only real flaw is the documentation. Developers that have well-grounded experience are impressed with the stability that the libraries have. I would suggest learning this framework once you are a seasoned developer because it is very close to writing Java.
Finally, what if you don't use any PHP framework and just use composer packages. I only need to say one thing, you have to be really careful as your project may become huge. You would be starting with a blank canvas with no code at all and you will start to add composer libraries on the fly. This theoretically a good idea. You can use any library you love, it is possible that the best composer libraries usually come from the development of other frameworks. In the long run, you may end up with four frameworks compiled into your project, making it more difficult to extend it with new developers. You have to be careful if you are going to follow this path, it is better to choose a framework that you love and use external libraries from a composer if it's necessary. This way at least you will have consistency on how you and your team will write code, making sure that your code is not too heavy with the extra libraries that they choose.
As a summary use whatever framework fits you and don't listen to the trends. If you are happy with the framework that you are using - it works. Keep the project in mind, usually most projects start small and get bigger.