Phalcon(The fastest PHP framework)

Sharing my experience on the latest PHP framework Phalcon.
What is Phalcon ?                         images
Phalcon is full-stack, MVC based PHP framework like Codeigniter, Laravel, Yii with some extra features which differs it from all.

 
Here are some points to understand the core difference:-

  •  The core reason why it differs from all is that unlike other PHP frameworks Phalcon is implemented as an extension written in C in order to optimize performance.
  • This is intended to boost execution speed and reduce resource usage with the goal of handling more requests per second than comparable frameworks written primarily in PHP.
  • Phalcon includes an ORM (Object-relational mapping) written in C.
  • Phalcon also includes a high-level dialect of SQL called PHQL.
  • Phalcon includes a template engine called Volt.

Now focussing on the point- why Phalcon has low overhead:-

  • PHP Phalcon C-extensions are loaded together with PHP one time on the web server’s daemon start process.
  • Classes and functions provided by the extension are ready to use for any application.
  • The code is compiled for a specific platform and isn’t interpreted.

The beginners should not be afraid to start with Phalcon thinking that one should have the knowledge of C language because Phalcon is an open source, full stack framework for PHP written as a C-extension, optimized for high performance and as such you don’t need to learn or use the C language, the functionality is exposed as PHP classes ready for you to use.

  • Phalcon is also loosely coupled, allowing you to use its objects as glue components based on the needs of your application.

Compiled for Better Performance:-
One major drawback for PHP is that on every request, all files are read from the hard drive, translated into bytecode, and then executed. This causes some major performance loss when compared to other languages like Ruby (Rails) or Python (Django, Flask). With Phalcon the whole framework is already  in RAM, so the whole set of framework files don’t need to process.
So this is dominant reason how Phalcon serves more than double of other PHP frameworks requests per second. And when you look at the time per request, Phalcon takes the least amount of time to handle requests. So whenever a framework says that it’s fast, think that Phalcon is even faster.
phalcon-01
References:-