Upload
fwdays
View
444
Download
4
Embed Size (px)
Citation preview
Phalcon 3.0 & ZephirAndres GutierrezPhalcon
About me
● PHP Developer● More than 10.000 hours programming
A FRAMEWORK FORPHP
DELIVERED AS AN EXTENSION
Some time ago...
Phalcon 0.1.x/0.2.xA group of nerds trying to make a full stack C framework work for the first time
Year: 2011
Social Networks: 0Look everyone!, it’s a pointer
Let’s try to call a PHP function from C
Phalcon 0.3.0First public release
Basic functionality working
Released: 2012
Social Networks: 45
Phalcon 0.5.0Single-module apps, Dependency Injection, PHQL, Micro apps, CLI and more
Only MySQL/PostgreSQL databases were supported
Released: 2012
Social Networks: 400
Phalcon 0.6.0Volt template engine & MongoDB support
Released: 2013
Social Networks: 700
Phalcon 1.0.0Full MVC Applications (Single-Module, Multi-Module and Micro Applications)
ORM (Transactions, Behaviors, Relations, PHQL, Events, Validations, Hydration, Logging, Profiling, Sharding)
Annotations, escaping, encryption and more
Released: 2013
Social Networks: 2100
Phalcon 2.0Core was rewritten in Zephir
Full backwards compatibility with Phalcon 1.x
Released: 2014
Social Networks: 6700
Zephir
ZephirThe main goals of Zephir are:
● Static/Dynamic typing
● Automatic memory management
● Strict and explicit behavior over flexible and implicit behavior
● Produce object-oriented libraries that can be used in PHP
● Hide unnecessary complexity to developers
● Make the code more debuggable
● Produce exceptions in runtime instead of notices/warnings when possible
● Detect potentially slow or unreachable code and notify the developer about it
● Provide a very low learning curve without creating a new PHP/C implementation
Zephir
Zephir● Create extensions for PHP 5 and PHP 7● Create DLLs for Windows● Create Shared Objects (.so) for Linux/Unix● OSX support
NGINX: 9,000 req/s (serving a plain html file)
NGINX + PHP7: 5,000 req/s (serving a hello world)
NGINX + PHP7 + Phalcon: 2,500 req/s (serving a hello world from a controller)
NGINX + PHP7 + Phalcon + MySQL: 800 req/s (serving some data from the database)
Real performance best practices● Cache everything apc, redis, memcached
Real performance best practices● Scale your sessions up
Phalcon 3.0.0PHP7 support
Removed old APIs
LTS extended support
Released: 2016
Social Networks: 12,800
Gracias/Thanks!Questions?