Presentation of the new PHP version along with bits of history and benchmarks of our Ulabox app at the PHP Day Spain 2015
View Slide
That's Me!Albert Casademontulabox.com@acasademont(no Linkedin available, sorry!)
HipHop Virtual MachineHipHop for PHP
PHP6PHPNG
¡PHP7!
but first...
Get PHP 5.6PLEASE
variadics
splat operator
** operator
+ nice speed bump
PHP7a.k.a.PHPNG
Internalsheavily modified data structs(current extensions won't work)call frame optimizationnew memory managerwe finally have an AST!no JIT (yet)
InternalsImmutable arraysPCRE with JITnew JSON parser...and more to come(watch Dmitry Stogof's talk on PHP7 internals for more!)
Removed featuresmysql extension :'(ereg extensionASP style tags...and many more
null coalescehttps://wiki.php.net/rfc/isset_ternary
uniform variablehttps://wiki.php.net/rfc/uniform_variable_syntax
¡¡¡return types!!!https://wiki.php.net/rfc/return_types
¿named parameters?https://wiki.php.net/rfc/named_params
¿nullable types?https://wiki.php.net/rfc/nullable_types
¿scalar type hinting?https://wiki.php.net/rfc/scalar_type_hints
Test environmentVM Debian 7 1GB RAM, 1 core, SSDulabox.com symfony 2 index / product pagePHP 5.5 / 5.6 / 7.0opcache.validate_timestamps = 0opcache.enable_file_override = 1HHVM 3.5Hhvm.server_stat_cache = 1No extensions! (APCu)Nginx, Redis, Solr, MySQL
PHP 5.5 PHP 5.6 XXX XXX020406080100120140160180200102 10161 641331307983190 19011232IndexProductBench.phpmsec
and theOscar goesto...
PHP 5.5 PHP 5.6 PHP 7.0 HHVM 3.5020406080100120140160180200102 10161 641331307983190 19011232IndexProductBench.phpmsec
Resourceshttps://wiki.php.net/phpnghttps://wiki.php.net/rfchttp://news.php.net/php.internalshttps://joind.in/talk/view/12068https://atlas.hashicorp.com/rasmus/boxes/php7devhttps://github.com/php/php-src
gràcies ;)