When comparing Phalcon vs Laravel 5, the Slant community recommends Laravel 5 for most people. In the question“What are the best backend web frameworks?” Laravel 5 is ranked 8th while Phalcon is ranked 10th. The most important reason people chose Laravel 5 is:
With migrations, powerful and intuitive Eloquent CRUD, resource routing, and simple JSON response out of the box, a complete REST API can be written in hours.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Extremely fast
Since the framework is and extension built in C it's extremely fast and efficient. It's actually one of the fastest PHP frameworks, and according to some benchmarks it's the fastest framework out there.
Pro Open source
Phalcon is open source and is available under the BSD License.
Pro Uses Volt template engine
The Volt template engine, which is embedded into Phalcon itself takes it's inspiration from the Jinja template engine and as such it's nice to look at, with a clear and understandable syntax.
Volt also compiles very fast, like Phalcon itself, so it avoids being a bottleneck for the framework's overall speed.
Pro Very flexible project structure
You can set up the base project as you want. It's very flexible
Pro Clean and light project code
Since the framework code is not in the project directory, the code is light and clean.
Pro Customizable with Zephir
Zephir is a high-level language designed to create PHP extensions easily by PHP programmers with no knowledge in C.
Zephir does this by compiling directly to C and then the C program is in turn compiled to be run as a PHP extension. This, coupled with the fact that Zephir's syntax is very similar to PHP makes it a perfect way for PHP developers to use it for customizing Phalcon.
Pro Loosely coupled components
Some components can be used as standalone packages like models, views, etc..
Pro Good for building RESTful APIs
With migrations, powerful and intuitive Eloquent CRUD, resource routing, and simple JSON response out of the box, a complete REST API can be written in hours.
Pro Comes with an excellent built-in ORM
Laravel's Eloquent ORM is a simple and fast Object-Relational Mapping which helps with organizing the application's database. It supports the most popular databases (MySQL, Postgres, SQLite, etc.) out of the box.
Pro Good documentation
Laravel's documentation is thorough and very good. It covers everything and is very helpful to experienced and new users alike.
Pro Handles event queuing
Laravel supports event queuing and it does so in a very simple way. To create an event that should be queued just run:
php artisan handler:event SendPurchaseConfirmation --event=PodcastWasPurchased --queued
This creates a handler that implements the Illuminate\Contracts\Queue\ShouldBeQueued
interface. Now when this handler is called it will automatically be queued by the event dispatcher.
Pro Comes with its own CLI
Laravel comes out of the box with it's own CLI called Artisan. With Artisan developers can do several different tasks such as migrating databases, seeding databases, clearing the cache and much much more.
Pro Easy to write web apps with authentication
Laravel comes with Authentication capabilities and a fully-powered Auth class out of the box. For passwords it uses bcrypt.
Pro Easy to learn
Pro Gives developers a great degree of freedom in how they set up their project structure
Laravel allows for free configuration and does not force developers to use a single project structure, instead they can change it to how they wish.
Pro Can use Symfony components
Laravel uses many libraries built for the Symfony PHP framework. Many of these libraries are well-built and have been tested by users before. Since the point of using a web framework is to shorten development time and to avoid reinventing the wheel for problems that have already been solved, then it's logical for a framework to use libraries already built to solve problems that have already been solved.
Pro Extremely powerful template system
Laravel has a powerful template system called Blade. It's quite similar to Twig or Moustache with lots of curly braces but the real power comes from the usage of PHP code directly in the view. Blade templates compile directly to raw PHP and are processed in the server when a request is made.
Pro Gulp tasks in the form of Laravel Elixir
In Laravel 5.0 they added Laravel Elixir, which provides an API for using Gulp tasks for Laravel applications. Elixir supports several CSS preprocessors and even some test tools. But it's still in the early stages of development and it will be developed even further in the following releases. With more methods and more Gulp tasks supported.
Pro Great Ecosystem
Has a great Ecosystem with SAAS like: Forge, Envoyer, Nova & from 3rd parties like oh-dear
Pro Great Community
Cons
Con Not for shared hosting
Phalcon needs root access to install the PHP extension which is written in C. Developers who plan on using Phalcon must use VPS or Cloud Hosting with root access available.
Con Require good programming skills
Not so easy to use if you want to gain the best from it.
Con Debugging requires knowledge of C
You need to be a C programmer to debug Zephir or C code. Or if Phalcon is not maintained anymore and you have a problem and don't have much skills in C, you will be hard-pressed to find a C programmer to fix it.
Con Uses too much magic methods
It complicates debugging and autocompletion.
Con Bloated
While the speed doesn't seem to be an issue with it (on local tests), in production it may be hindered. The framework creates a ton of files and folders, some of which your app might not even use. Not good if you don't like having a ton of folders and rigid non-standard PHP folder structure for development.
Con Hard to use model properties
You need to check all model properties in database to know it exists, or declare all them manually.
Con Steep learning curve
While a lot of times you can write things in plain PHP, it will hinder you down the line when you want to use core features and find that you have to rewrite code which then causes issues throughout the app. Documentation is good, but you need to know what you are looking for and practical examples are non-existent. Many features have been updated throughout the versions in such a short time that tutorials you find online are confusing to sort through outdated tutorials and guides that no longer work or have been depreciated.
Con Poor performance
Con Follows bad design practices
Uses bad practices, like Singletons, Magic models, Middleware.