SlideShare a Scribd company logo
1 of 59
PHP 7, 8 ,HHVM & CO
OCTOBER 13, 2016
PHP Conference
Manila
Pierre Joye
Pierre Joye
@pierrejoye
pierre@php.net
http://www.slideshare.net/pierre
PHP Core developer
OSS dev
Portability fan
hiring@BK
K
stats
contribute
.
https://edit.p
hp.net
What‘s new in PHP
worlds?
Awesome new extension installer
https://github.com/FriendsOfPHP/pickle
RFCs
https://wiki.php.net/
rfc
Release
Process RFC
Lifecycle
PHP 5.3
2009 - 2014
PHP 5.4
2012 - 2015
PHP 5.5
2013 - 2016
January 2017: security
fixes only
PHP 5.6
5.6.26
5 + 1 = 7
6.6.6
7.0.11
7.1
Future is now
7.0 -
speed++
lies, damned lies & benchmarks
PHP 7.0
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
■ Secure RNG
■ PHP4 constructors deprecated
■ JIT enabled PCRE
■ Removed ext/mysql, ext/ereg and more
■ New ?? and spaceship operators
■ New JSON parser
■ Many other features, a lot already target
7.1
PHP 7.1
FEATURES
■ Multiple Exception types catch
■ Http/2 Push support
■ Class constant visibility
■ Improved return types (void and more)
■ Allow custom keys for list(“foo“, “bar“)
■ Warning about invalid strings in arithmetic ops
■ Many more features
PHP
SPECIFICATIONS
https://github.com/php/php-langspec
OPEN & PUBLIC
SPECIFICATIONS
COMPETIONS++
FOCUS ON SPEED
(MOST)
SPEED IS NOT
SCALE
STEROID++
What is scale?
SO?
<?php
class OilPaintFilter {
/** @var int32 */ public $levels = 25;
/** @var int32 */ public $filterSize = 5;
/** * @engine qb
*
* @param image $dst
* @param image $src
*
* @local float32[*][r,g,b,a] $bin
* @local float32 $max_intensity
* @local int32 $(current_index|max_index)
* @local int32 $(filter_x|filter_y|filter_offset)
* @local int32 $(x|y|x_limit|y_limit)
* @local int32 $(width|height)
* @local float32[r,g,b,a] $pixel
* @local float32 $multiplier */
public function filter(&$dst, $src) {…
QB
<?php
function calc($n, &$a) {
$b = 18;
while($n) {
$a = $b * $b * $b * $b;
$n--;
}
}
$n = 5000000;
$a = 0;
calc($n, $a); $end = microtime(true);
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
ZEPHIR
Optimization & code generation
Compilation + optimization
Native execution
namespace MyLibrary;
class Filter {
public function alpha(string str) {
char ch;
string filtered = "";
for ch in str {
if (ch >= 'a' && ch <= 'z') || (ch >= 'A'
&& ch <= 'Z') {
let filtered .= ch;
}
}
return filtered;
}
}
<?php
$filter = new MyLibraryFilter();
echo $filter>alpha("01he#l.lo?/1");
PHP8
https://github.com/zendtech/php-src/tree/jit-
dynasm/ext/opcache/jit
20% speedup on
bench.php
PHP Alternative
Implementations
Tagua VM
Rust based PHP
Implemetation
https://github.com/tagua-vm/tagua-vm
Future
■ Extend PHP using php (à la hhvm)
■ Go, Rust, .net extensions
Resources
■ http://wiki.php.net/rfc/
■ http://zephir-lang.com/
■ http://www.slideshare.net/ircmaxell/high-performance-php-phpnw
■ http://talks.php.net/fluent15#/
■ https://github.com/google/recki-ct
■ http://blog.ircmaxell.com/2014/08/introducing-recki-ct.html
■ https://github.com/chung-leong/qb/wiki/Introduction
Resources
■ https://edit.php.net/
■ https://wiki.php.net/rfc/phpng
■ https://wiki.php.net/rfc/abstract_syntax_tree
■ http://hhvm.com/blog/6323/the-journey-of-a-thousand-bytecodes
■ https://github.com/php/php-src/blob/master/UPGRADING
■ https://github.com/php/php-src/blob/master/UPGRADING.INTERNALS
Resources
■ http://phpdbg.com/
■ http://windows.php.net/qa/
■ http://qa.php.net/
■ http://ongr.io
■ http://aka.ms/AzureCodeManiac2015

More Related Content

What's hot

Hacking Go Compiler Internals / GoCon 2014 Autumn
Hacking Go Compiler Internals / GoCon 2014 AutumnHacking Go Compiler Internals / GoCon 2014 Autumn
Hacking Go Compiler Internals / GoCon 2014 Autumn
Moriyoshi Koizumi
 
All I know about rsc.io/c2go
All I know about rsc.io/c2goAll I know about rsc.io/c2go
All I know about rsc.io/c2go
Moriyoshi Koizumi
 
Controlling Arduino With PHP
Controlling Arduino With PHPControlling Arduino With PHP
Controlling Arduino With PHP
Thomas Weinert
 
Asynchronous I/O in PHP
Asynchronous I/O in PHPAsynchronous I/O in PHP
Asynchronous I/O in PHP
Thomas Weinert
 
Javascript & Ajax Basics
Javascript & Ajax BasicsJavascript & Ajax Basics
Javascript & Ajax Basics
Richard Paul
 
Nette framework (WebElement #28)
Nette framework (WebElement #28)Nette framework (WebElement #28)
Nette framework (WebElement #28)
Adam Štipák
 

What's hot (20)

Hacking Go Compiler Internals / GoCon 2014 Autumn
Hacking Go Compiler Internals / GoCon 2014 AutumnHacking Go Compiler Internals / GoCon 2014 Autumn
Hacking Go Compiler Internals / GoCon 2014 Autumn
 
Maintainable go
Maintainable goMaintainable go
Maintainable go
 
All I know about rsc.io/c2go
All I know about rsc.io/c2goAll I know about rsc.io/c2go
All I know about rsc.io/c2go
 
Angular Restmod (english version)
Angular Restmod (english version)Angular Restmod (english version)
Angular Restmod (english version)
 
Variable precedence: Where should I put a variable?
Variable precedence: Where should I put a variable?Variable precedence: Where should I put a variable?
Variable precedence: Where should I put a variable?
 
Controlling Arduino With PHP
Controlling Arduino With PHPControlling Arduino With PHP
Controlling Arduino With PHP
 
Node.js - iJS 2019
Node.js - iJS 2019Node.js - iJS 2019
Node.js - iJS 2019
 
Arp
ArpArp
Arp
 
Block introduce
Block introduceBlock introduce
Block introduce
 
JavaScript - Agora nervoso
JavaScript - Agora nervosoJavaScript - Agora nervoso
JavaScript - Agora nervoso
 
Asynchronous I/O in PHP
Asynchronous I/O in PHPAsynchronous I/O in PHP
Asynchronous I/O in PHP
 
Sol8
Sol8Sol8
Sol8
 
iPhone and Rails integration
iPhone and Rails integrationiPhone and Rails integration
iPhone and Rails integration
 
block introduce
block introduceblock introduce
block introduce
 
Consuming Web Services with Swift and Rx
Consuming Web Services with Swift and RxConsuming Web Services with Swift and Rx
Consuming Web Services with Swift and Rx
 
Javascript & Ajax Basics
Javascript & Ajax BasicsJavascript & Ajax Basics
Javascript & Ajax Basics
 
PyData Berlin Meetup
PyData Berlin MeetupPyData Berlin Meetup
PyData Berlin Meetup
 
Composition in JavaScript
Composition in JavaScriptComposition in JavaScript
Composition in JavaScript
 
Nette framework (WebElement #28)
Nette framework (WebElement #28)Nette framework (WebElement #28)
Nette framework (WebElement #28)
 
Swift core
Swift coreSwift core
Swift core
 

Viewers also liked (6)

PHP Internals
PHP InternalsPHP Internals
PHP Internals
 
Test Fest 2009
Test Fest 2009Test Fest 2009
Test Fest 2009
 
Php On Windows Internals
Php On Windows InternalsPhp On Windows Internals
Php On Windows Internals
 
Distraction osteogenesis
Distraction osteogenesisDistraction osteogenesis
Distraction osteogenesis
 
Understanding PHP memory
Understanding PHP memoryUnderstanding PHP memory
Understanding PHP memory
 
History of Dentistry
History of DentistryHistory of Dentistry
History of Dentistry
 

Similar to Php 7.x 8.0 and hhvm and

Similar to Php 7.x 8.0 and hhvm and (20)

Cilium: Kernel Native Security & DDOS Mitigation for Microservices with BPF
Cilium: Kernel Native Security & DDOS Mitigation for Microservices with BPFCilium: Kernel Native Security & DDOS Mitigation for Microservices with BPF
Cilium: Kernel Native Security & DDOS Mitigation for Microservices with BPF
 
Cilium – Kernel Native Security & DDOS Mitigation for Microservices with BPF
Cilium – Kernel Native Security & DDOS Mitigation for Microservices with BPFCilium – Kernel Native Security & DDOS Mitigation for Microservices with BPF
Cilium – Kernel Native Security & DDOS Mitigation for Microservices with BPF
 
Php 7 hhvm and co
Php 7 hhvm and coPhp 7 hhvm and co
Php 7 hhvm and co
 
The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6The why and how of moving to PHP 5.5/5.6
The why and how of moving to PHP 5.5/5.6
 
Php7 HHVM and co
Php7 HHVM and coPhp7 HHVM and co
Php7 HHVM and co
 
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
 
The new features of PHP 7
The new features of PHP 7The new features of PHP 7
The new features of PHP 7
 
Php7 hhvm and co
Php7 hhvm and coPhp7 hhvm and co
Php7 hhvm and co
 
PHP QA Tools
PHP QA ToolsPHP QA Tools
PHP QA Tools
 
2019 11-bgphp
2019 11-bgphp2019 11-bgphp
2019 11-bgphp
 
Diving into HHVM Extensions (Brno PHP Conference 2015)
Diving into HHVM Extensions (Brno PHP Conference 2015)Diving into HHVM Extensions (Brno PHP Conference 2015)
Diving into HHVM Extensions (Brno PHP Conference 2015)
 
Last 2 Months in PHP - July & August 2016
Last 2 Months in PHP - July & August 2016Last 2 Months in PHP - July & August 2016
Last 2 Months in PHP - July & August 2016
 
DevOps in PHP environment
DevOps in PHP environmentDevOps in PHP environment
DevOps in PHP environment
 
Diving into HHVM Extensions (PHPNW Conference 2015)
Diving into HHVM Extensions (PHPNW Conference 2015)Diving into HHVM Extensions (PHPNW Conference 2015)
Diving into HHVM Extensions (PHPNW Conference 2015)
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
PHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing InsanityPHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing Insanity
 
Beyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic AnalysisBeyond Breakpoints: A Tour of Dynamic Analysis
Beyond Breakpoints: A Tour of Dynamic Analysis
 
PHP7 Presentation
PHP7 PresentationPHP7 Presentation
PHP7 Presentation
 
Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?Is your code ready for PHP 7 ?
Is your code ready for PHP 7 ?
 
A brief to PHP 7.3
A brief to PHP 7.3A brief to PHP 7.3
A brief to PHP 7.3
 

More from Pierre Joye

Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18
Pierre Joye
 
Intro ipcberlin2012
Intro ipcberlin2012Intro ipcberlin2012
Intro ipcberlin2012
Pierre Joye
 
Php symfony and software lifecycle
Php symfony and software lifecyclePhp symfony and software lifecycle
Php symfony and software lifecycle
Pierre Joye
 

More from Pierre Joye (13)

Php core. get rid of bugs and contribute
Php core. get rid of bugs and contributePhp core. get rid of bugs and contribute
Php core. get rid of bugs and contribute
 
Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18Webdevcon Keynote hh-2012-09-18
Webdevcon Keynote hh-2012-09-18
 
Devcon hh-2012
Devcon hh-2012Devcon hh-2012
Devcon hh-2012
 
Short Intro talk to IPC/Berlin 2012
Short Intro talk to IPC/Berlin 2012Short Intro talk to IPC/Berlin 2012
Short Intro talk to IPC/Berlin 2012
 
Intro ipcberlin2012
Intro ipcberlin2012Intro ipcberlin2012
Intro ipcberlin2012
 
Webdevcon pierrejoye-php54-and-other
Webdevcon pierrejoye-php54-and-otherWebdevcon pierrejoye-php54-and-other
Webdevcon pierrejoye-php54-and-other
 
Php symfony and software lifecycle
Php symfony and software lifecyclePhp symfony and software lifecycle
Php symfony and software lifecycle
 
Mongodb - drupal dev days
Mongodb - drupal dev daysMongodb - drupal dev days
Mongodb - drupal dev days
 
Webplatform And Php
Webplatform And PhpWebplatform And Php
Webplatform And Php
 
Keynote, PHP World Kongress Munich
Keynote, PHP World Kongress MunichKeynote, PHP World Kongress Munich
Keynote, PHP World Kongress Munich
 
Php On Windows
Php On WindowsPhp On Windows
Php On Windows
 
PHP Worl Kongress Munich
PHP Worl Kongress MunichPHP Worl Kongress Munich
PHP Worl Kongress Munich
 
Developing PHP internals on Windows
Developing PHP internals on WindowsDeveloping PHP internals on Windows
Developing PHP internals on Windows
 

Recently uploaded

Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 

Recently uploaded (20)

COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 

Php 7.x 8.0 and hhvm and

Editor's Notes

  1. Optimum value engineering
  2. Scalar types – Andrea Faulds, Anthony Ferrara … CSPRNG – Sammy Kaye Powers
  3. Scalar types – Andrea Faulds, Anthony Ferrara … CSPRNG – Sammy Kaye Powers
  4. 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.
  5. Function calls poorly implemented