Phalcon PHP is “the next big thing” in PHP frameworks, going up against the big boys like Symphony, Laravel and Zend, and out performing. Impossible you say! Well the makers of Phalcon did “cheat” a bit.
What executes faster than PHP? C seems to be pretty fast.
That’s exactly what the Phalcon PHP team has done. They have created a really densely-featured framework and written the entire source in C and packaged it as a PHP extension. If you’ve worked with Laravel or a few other pure PHP frameworks, you’ve probably come across an extension called Mcrypt. It is written in C to make encryption a relatively inexpensive process in CPU time. Phalcon PHP takes this one step further by saying, we can save processor time by moving our entire framework to a compiled extension. When we look at the numbers, this technique’s boosted performance becomes readily apparent.
Performance of Phalcon PHP and other PHP Frameworks
Pros and Cons of Phalcon PHP
Incredible right? According to webcoderpro.com, Code Igniter is the most popular framework of 2013. Although it maintains a respectable place on the chart it does not touch Phalcon PHP. So why is Phalcon PHP not the most popular frame? There are a few major drawbacks.
Drawbacks of Phalcon PHP
- Compiled Extension (complex install, impossible on shared hosting)
- Young compared to competition (March 2012)
- If something goes really wrong, you’re debugging C
If I’m honest, as I was writing the drawbacks, I came up with ways around all of them:
Solutions to Drawbacks of Phalcon PHP
- It’s actually not that hard to install. Don’t use shared hosting. If you’re at a level in your development where you’re using a big framework and are tackling projects larger than a WordPress site, its probably time to check out a better host like Digital Ocean or Rackspace.
- For being just under two years old, the community, documentation and maturity of the framework rival many of the slower frameworks on the graph.
- Yes debugging in C for a PHP coder sucks but the community and the help you’ll find on stack overflow will help mitigate this risk.
Let’s sweeten the deal with some pros:
Pros of Phalcon PHP
- Fast, blazing fast, really fast, its written in C fast
- Traditional MVC code. The PHP part is very similar to other MVC frameworks
- Cool factor. It has some of the same coolness of Laravel 4 when it first came out
Phalcon PHP is not perfect for every situation. I’d much rather throw together a quick Laravel instance to mock up a prototype but for a large, performance driven project, hosted on a VPS, I don’t see many reasons to hesitate.