For future project purposes i did a comparision between popular PHP frameworks:
-
Zend 2.3.5
-
Kohana 3.3.3.1
-
Laravel 5.0.13
- Phalcon 1.3.4
Environment specification: (same for all frameworks)
-
Nginx v1.6.2
-
PHP-FPM v5.6.7
- PostgreSQL v9.4.1
In simple "Hello world!" test it kick ass.
In raw SQL query is similar to the others frameworks.(Probably DB is the bottleneck) But in scenario using ORM was last.
Phalcon code: No ORM
$connection = new \Phalcon\Db\Adapter\Pdo\Postgresql($config); $resultset = $connection->query("SELECT * FROM users"); var_dump($resultset->fetchAll());
ORM
$users = Users::find(); var_dump($users->toArray());
Both cases gives same output. Using the ORM is at least 3,5 times less efficient than raw query.
I know what is ORM and i know that its less efficient but dont you think its something wrong with Phalcon ORM impementation?