Have you heard yet about the full stack PHP framework called Phalcon? It’s written in C, it’s super fast, well documented and it brings lots of freshness into the PHP world. It has been around for awhile now but for some reason it’s been under my radar until now. Why is it so special? If you allow me I will here attempt to prove that this framework has a potential to change the game.
I’ve done a quick research and the PHP community remains silent on this subject. There is only one post on dzone.com and two on phpdeveloper.org. One of them was written by Anthony Ferrara which in fact is a criticism of C based frameworks. Anthony is a very popular and respected PHP blogger. Perhaps his opinion was enough to put down any initial excitement about the Phalcon.
Although I understand Anthony’s points I respectfully don’t agree with them. Currently I’m facing quite a big issue with the performance of ZF1 and PropelORM frameworks. Both are heavily abstracted and there is lots of inheritance in place. One request includes almost 300 files. Only 25% of those files are our code. Even if a controller is empty it takes significant time to handle a request (APC in installed and there is no I/O). This is a major concern to our business and we have some solutions in place to mitigate it.
It is common knowledge within the community that a vast majority of PHP application will never work under high traffic. However it is not only about requests per second but also user experience. According to Google (as mentioned in: “In The Plex: How Google Thinks, Works and Shapes Our Lives”) there is a correlation between load time and consumed content. Users will do more if they have to wait less. Google is very religious about making their service faster so why we all shouldn’t be?
While discussing Phalcon it’s easy to forget that performance is not the only feature. Phalcon is a full stack framework and can do a lot. It offers things like: ORM, query language, template engine, micro application front controller or very handy devtools. It’s all wrapped in a rich documentation with good examples.
The biggest problem I can see with C based frameworks is that there is no direct access to the source code. I completely agree with Anthony on this point. You can’t document everything and you won’t find all answers on Google. There will be situations when one have to debug something. It doesn’t happen often but once it happens it might be a dead end. If looking into a code written in C gives you a cold sweat perhaps Phalcon is not the best option for you. The good news is that, Phalcon’s source is well maintained. The file structure is intuitive and code is readable. Even a basic C knowledge should be enough to debug most of the potential issues.
We all know that PHP programmers don’t have a good PR. Things like Phalcon might cast a new light on the community and the language. For me it’s a step forward but Phalcon is going to have hard time. There are many strong PHP frameworks on the market. Many bloggers, speakers and lead developers invested lots of time in them. Suddenly there is a new kind on the block which makes those frameworks look little bit well… outdated. Things like this will always generate some emotions and programmers are emotional beings.
For me Phalcon is a no-brainer. It is 5 times faster than any other PHP framework. That is totally due to it being a C extension. That means that when scaling, you need 5 times fewer servers to support the same traffic. I can put up with a lot of crap from a framework to gain that sort of performance!
LikeLike
I have used/tried just about every framework for PHP and I can honestly say that Phalcon is hands down the fastest and least memory user of them all. I just came from Laravel (Which I really did like that framework) and am a total convert. Phalcon is actually dead easy to learn and has everything I could possibly want in an advanced framework.
If anyone reading this has not read up on this awesome framework I urge you to check it out. I am beating that a large percentage will also be a convert like me!
LikeLiked by 1 person
PhalconPHP is the most underrated framework. It is insanely fast and the learning curve is extremely easy. I am pretty sold on it.
LikeLike
I couldn’t agree more. More I know this framework, more I fell in love
LikeLike
Agree with this. More I know , more I fell in love.
LikeLike
Phalcon gets everythings we need. For me as a DevOP it’s so important to work on, less ressources and fast query responses and we still working to get this done !! but now phalcon brings us the speed and the lightness. PLEASE use it and give it a chance.
LikeLike
Stable and Extremely Fast …
LikeLike
Phalcon PHP seems like an awesome framework. I’d love for you to read my take on it: briananglin.me/2014/01/what-is-phalcon-php/
Thanks!
LikeLike
I came across this article a few months ago and i want to thank the author, because i’m now using phalcon and i’m really glad i learned it !!
I did some benchmark between symfony2 and phalcon just for fun on a phony project, and phalcon was between 10 and 20 time faster !!!
Phalcon is easy to learn (it’s only my second framework) and even if sometimes there is a feature not developped or not yet working properly, it’s reaaaally worth it .
Besides, the team behind this framework is nice and the community is always here to help on the official forum or IRC chan/
LikeLike
My pleasure😉
LikeLike
Hi Lukasz,
Phalcon 2.0 alpha released, this is time for updating your point “The biggest problem I can see with C based frameworks is that there is no direct access to the source code.”. Because Phalcon 2.0 has been rewriting in new language Zephir. It’s no-barriers for us to dig in to the source code any more ^^. Thank you for your post.
LikeLike
Phalcon is the best PHP framework by far, IMO. I’ve tried Laravel, but it’s just like rails copy for PHP.
LikeLike
It is easy in fix bug in C code (e.g. Phalcon) than in Laravel
LikeLike