Introduction to php7, its performance improvements, presenting alternative to boost your code if waiting for php7 is not an option, like hhvm, zephir or QB allowing immediate gains using php 5.5+.
Presented at the Istanbul PHP Conference
2. PHP7, hhvm & co
Pierre Joye
@pierrejoye
pierre@php.net
http://www.slideshare.net/pierrej
PHP Core developer
Contributors to numerous OSS projects
Portability fan
19. PHP7, hhvm & co
Features
⢠Rewamped Engine
⢠True 64bit support
⢠Large string and LFS (Large file support)
⢠Consistent variables syntax
⢠Error exception instead of fatal error
⢠Scalar type declarations
⢠Zero cost asserts
20. PHP7, hhvm & co
Features
⢠Secure RNG
⢠PHP4 constructors deprecated
⢠JIT enabled PCRE
⢠Removed ext/mysql, ext/ereg and more
⢠New ?? Operator
⢠New JSON parser
⢠Many other features, a lot already target 7.1
21. PHP7, hhvm & co
Error exception instead of fatal error
22. PHP7, hhvm & co
Error exception
https://wiki.php.net/rfc/catchable-call-to-member-of-non-object
<?php
try {
$x = null;
var_dump($x->method());
// The exception class name is EngineException
// in alpha1
} catch (Error $e) {
// pass
}
echo "Aliven";
44. PHP7, hhvm & co
QB
Source: http://php-qb.net/index.php/2-uncategorised/27-comparing-performance-in-qb-with-hhvm
See http://benchmarksgame.alioth.debian.org/u32/performance.php?test=spectralnorm or other
Pomato pap, tomato mom and a small tomato are crossing the road. The tomato pap tells the small tomato â hurry up, catchup. â secret files, not by word citation ď
Fall 2015
Stabilization
RFCs in discussions
More optimizatons coming
Fall 2015
Stabilization
RFCs in discussions
More optimizatons coming
Scalar types â Andrea Faulds, Anthony Ferrara ⌠CSPRNG â Sammy Kaye Powers
Fall 2015
Stabilization
RFCs in discussions
More optimizatons coming
Fall 2015
Stabilization
RFCs in discussions
More optimizatons coming
Fall 2015
Stabilization
RFCs in discussions
More optimizatons coming
Yes butâŚ.
Speed is not scale
Most of you have no scaling problem
Your code simply sucks (mines too)
Changing languages, servers, platforms do not fix scale issues
Fix your code, design and architecture
Fast PHP is about scale, not speed.
Except Larsâ
Except Larsâ
Function calls poorly implemented
Delivery Man: Morning, Sir, I've got a parrot for Mr "Poy-rot".
Hercule Poirot: No no no! Poirot. It is pronounced "Pwa-roe".
Delivery Man: I beg your pardon, Governor. I've got a "pwa-roe" for Mr "Poy-rot".