SlideShare une entreprise Scribd logo
1  sur  25
Télécharger pour lire hors ligne
PHP7.1 New Features & Performance
@Laruence
About Me
• Author of Yaf, Yar, Yac, Yaconf, Taint, Lua, etc
• Maintainer of APC, Zend Opcache, Msgpack
• PHP core developer since 2011
• Zend consultant since 2013
• Core author of PHP7
• Chief Architect at Lianjia
PHP
• 20 years history
• Most popular Web service program
language
• Over 82% sites are use PHP as
server side program language
• Latest version is PHP-7.1
PHP71
• Nullable types
• Void return type
• Iterable pseudo-type
• Class constant visibility modifiers
• Specify keys in list()
• Square bracket syntax for list()
• Catching multiple exception types
• Missing arguments Excetpion
• Warn about invalid strings in arithmetic
• Generalize support of negative string offsets
• ….
Nullable types
• An enhancement for typehints
return type parameters
Void return types
• An enhancement for return type hint
Iterable Pseudo type
• Iterable accepts any array or object implementing Traversable
• Iterable can also be used in return type
Class constant visibility modifiers
• Support class constant visibility
Specify keys in list()
• An enhancement for list()
• Also works in foreach
specify keys in list specify keys in list with foreach
Square backtrace for list()
• Continuation syntax for short array syntax introduced in 5.4
• Also works in foreach too
Catching multiply exception types
• Allow catching multiply exception types in single catch
normal way PHP71 way
Missing arguments exception
• Disable calling “user” functions with insufficient actual parameters
before 71
after 71
Warn about invalid strings in arithmetic
• Produce E_NOTICE or E_WARNING when using invalid numeric
strings with arithmetic operators
Generalize support of negative string offsets
• Support of negative string offsets when it make sense
One More thing
PHP71 Performance
• Over 10% Perfromance improvement
0.901	
1.022	
2.991	
3.045	
3.102	
3.762	
5.318	
6.527	
13.424	
0	 2	 4	 6	 8	 10	 12	 14	 16	
PHP-7.1	
PHP-7.0	
PHP-5.6	
PHP-5.5	
PHP-5.4	
PHP-5.3	
PHP-5.2	
PHP-5.1	
PHP-5.0	
bench.php
Type specific opcode handlers
ZEND_ADD
ZEND_ADD_LONG_LONG
Type Inference system
• Part work of our JIT in 2013
normal branch loop
Static Single-Assignment Form
• An intermediate representation, variable is assigned exactly once
• Explicit use-def chain
Type Inference
• What’s ? ’s type at ? point
• Computed in compiling time
Type Specific opcode handler
• Use type specific opcode handler if possible
Type Inference system
• A tedious work
• And we can only get ~30% type-infos in WP
Type Specific opcode handlers
• ZEND_ADD(SUB|MUL)
• ZEND_PRE_INC(DEC)
• ZEND_POST_INC(DEC)
• ZEND_IS_(NOT_)EQUAL
• ZEND_IS_SMALLER(_OR_EQUAL)
• ZEND_QM_ASSIGN
• ZEND_SEND_VAR(_EX)
• ZEND_FETCH_DIM_R

And dozens of minor improvements
• More packed array constructions
• Constant propagation based on DFA
• Return type checks eliding
• dozens of minor improvements even I can not recall
Q&A

Contenu connexe

Tendances

Reviewing CPAN modules
Reviewing CPAN modulesReviewing CPAN modules
Reviewing CPAN modulesneilbowers
 
CPAN Exporter modules for Perl 5
CPAN Exporter modules for Perl 5CPAN Exporter modules for Perl 5
CPAN Exporter modules for Perl 5neilbowers
 
Shootout! template engines on the jvm
Shootout! template engines on the jvmShootout! template engines on the jvm
Shootout! template engines on the jvmNLJUG
 
Laravel Webcon 2015
Laravel Webcon 2015Laravel Webcon 2015
Laravel Webcon 2015Tim Bracken
 
Aspect j introduction for non-programmers
Aspect j introduction for non-programmersAspect j introduction for non-programmers
Aspect j introduction for non-programmersTamas Rev
 
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)Roes Wibowo
 
Laravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web ArtisansLaravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web ArtisansWindzoon Technologies
 
CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011Graham Weldon
 
Repeating History...On Purpose...with Elixir
Repeating History...On Purpose...with ElixirRepeating History...On Purpose...with Elixir
Repeating History...On Purpose...with ElixirBarry Jones
 
Robotframework
RobotframeworkRobotframework
RobotframeworkElla Sun
 
Laravel introduction
Laravel introductionLaravel introduction
Laravel introductionSimon Funk
 
GraphQL-PHP: Dos and don'ts
GraphQL-PHP: Dos and don'tsGraphQL-PHP: Dos and don'ts
GraphQL-PHP: Dos and don'tsVáclav Šír
 
Knowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP frameworkKnowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP frameworkBukhori Aqid
 
CakePHP - The Path to 2.0
CakePHP - The Path to 2.0CakePHP - The Path to 2.0
CakePHP - The Path to 2.0Graham Weldon
 
Introduction to Laravel
Introduction to LaravelIntroduction to Laravel
Introduction to LaravelVin Lim
 
Introduction to Laravel
Introduction to LaravelIntroduction to Laravel
Introduction to LaravelEli Wheaton
 

Tendances (20)

Reviewing CPAN modules
Reviewing CPAN modulesReviewing CPAN modules
Reviewing CPAN modules
 
CPAN Exporter modules for Perl 5
CPAN Exporter modules for Perl 5CPAN Exporter modules for Perl 5
CPAN Exporter modules for Perl 5
 
Shootout! template engines on the jvm
Shootout! template engines on the jvmShootout! template engines on the jvm
Shootout! template engines on the jvm
 
Laravel Webcon 2015
Laravel Webcon 2015Laravel Webcon 2015
Laravel Webcon 2015
 
Aspect j introduction for non-programmers
Aspect j introduction for non-programmersAspect j introduction for non-programmers
Aspect j introduction for non-programmers
 
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
What's New in Laravel 5 (Laravel Meetup - 23th Apr 15, Yogyakarta, ID)
 
Laravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web ArtisansLaravel - The PHP Framework for Web Artisans
Laravel - The PHP Framework for Web Artisans
 
CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011
 
2021laravelconftwslides6
2021laravelconftwslides62021laravelconftwslides6
2021laravelconftwslides6
 
Repeating History...On Purpose...with Elixir
Repeating History...On Purpose...with ElixirRepeating History...On Purpose...with Elixir
Repeating History...On Purpose...with Elixir
 
Robotframework
RobotframeworkRobotframework
Robotframework
 
Thymeleaf, will it blend?
Thymeleaf, will it blend?Thymeleaf, will it blend?
Thymeleaf, will it blend?
 
Laravel introduction
Laravel introductionLaravel introduction
Laravel introduction
 
GraphQL-PHP: Dos and don'ts
GraphQL-PHP: Dos and don'tsGraphQL-PHP: Dos and don'ts
GraphQL-PHP: Dos and don'ts
 
Knowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP frameworkKnowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP framework
 
Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
 
Php
PhpPhp
Php
 
CakePHP - The Path to 2.0
CakePHP - The Path to 2.0CakePHP - The Path to 2.0
CakePHP - The Path to 2.0
 
Introduction to Laravel
Introduction to LaravelIntroduction to Laravel
Introduction to Laravel
 
Introduction to Laravel
Introduction to LaravelIntroduction to Laravel
Introduction to Laravel
 

En vedette

The secret of PHP7's Performance
The secret of PHP7's Performance The secret of PHP7's Performance
The secret of PHP7's Performance Xinchen Hui
 
微博Lamp性能优化之路(2014)
微博Lamp性能优化之路(2014)微博Lamp性能优化之路(2014)
微博Lamp性能优化之路(2014)Xinchen Hui
 
PHP7 - For Its Best Performance
PHP7 - For Its Best PerformancePHP7 - For Its Best Performance
PHP7 - For Its Best PerformanceXinchen Hui
 
Php 5.4 performance
Php 5.4 performancePhp 5.4 performance
Php 5.4 performanceXinchen Hui
 
PHP7 - The New Engine for old good train
PHP7 - The New Engine for old good trainPHP7 - The New Engine for old good train
PHP7 - The New Engine for old good trainXinchen Hui
 
A History of PHP
A History of PHPA History of PHP
A History of PHPXinchen Hui
 
CreativeUnderworld Workshop
CreativeUnderworld WorkshopCreativeUnderworld Workshop
CreativeUnderworld WorkshopCreativeDon Jaff
 
Redis vs postgre sql
Redis vs postgre sqlRedis vs postgre sql
Redis vs postgre sqlToshi Harada
 
China PHP Technology Summit 2011 ppt
China PHP Technology Summit 2011 pptChina PHP Technology Summit 2011 ppt
China PHP Technology Summit 2011 pptXinchen Hui
 
Weibo lamp improvements
Weibo lamp improvementsWeibo lamp improvements
Weibo lamp improvementsXinchen Hui
 
PHP tutorial | ptutorial
PHP tutorial | ptutorialPHP tutorial | ptutorial
PHP tutorial | ptutorialPTutorial Web
 
PHP 7 – What changed internally?
PHP 7 – What changed internally?PHP 7 – What changed internally?
PHP 7 – What changed internally?Nikita Popov
 
The Php Life Cycle
The Php Life CycleThe Php Life Cycle
The Php Life CycleXinchen Hui
 
PHP 7 Crash Course - php[world] 2015
PHP 7 Crash Course - php[world] 2015PHP 7 Crash Course - php[world] 2015
PHP 7 Crash Course - php[world] 2015Colin O'Dell
 

En vedette (20)

The secret of PHP7's Performance
The secret of PHP7's Performance The secret of PHP7's Performance
The secret of PHP7's Performance
 
微博Lamp性能优化之路(2014)
微博Lamp性能优化之路(2014)微博Lamp性能优化之路(2014)
微博Lamp性能优化之路(2014)
 
PHP7 - For Its Best Performance
PHP7 - For Its Best PerformancePHP7 - For Its Best Performance
PHP7 - For Its Best Performance
 
Php 5.4 performance
Php 5.4 performancePhp 5.4 performance
Php 5.4 performance
 
PHP7 - The New Engine for old good train
PHP7 - The New Engine for old good trainPHP7 - The New Engine for old good train
PHP7 - The New Engine for old good train
 
A History of PHP
A History of PHPA History of PHP
A History of PHP
 
CreativeUnderworld Workshop
CreativeUnderworld WorkshopCreativeUnderworld Workshop
CreativeUnderworld Workshop
 
Redis vs postgre sql
Redis vs postgre sqlRedis vs postgre sql
Redis vs postgre sql
 
China PHP Technology Summit 2011 ppt
China PHP Technology Summit 2011 pptChina PHP Technology Summit 2011 ppt
China PHP Technology Summit 2011 ppt
 
Php performance
Php performancePhp performance
Php performance
 
Weibo lamp improvements
Weibo lamp improvementsWeibo lamp improvements
Weibo lamp improvements
 
Php Tutorial
Php TutorialPhp Tutorial
Php Tutorial
 
Mitos do PHP
Mitos do PHPMitos do PHP
Mitos do PHP
 
Seguranca em PHP @edgarsandi
Seguranca em PHP @edgarsandiSeguranca em PHP @edgarsandi
Seguranca em PHP @edgarsandi
 
PHP tutorial | ptutorial
PHP tutorial | ptutorialPHP tutorial | ptutorial
PHP tutorial | ptutorial
 
PHP 7 – What changed internally?
PHP 7 – What changed internally?PHP 7 – What changed internally?
PHP 7 – What changed internally?
 
The Php Life Cycle
The Php Life CycleThe Php Life Cycle
The Php Life Cycle
 
Data Types In PHP
Data Types In PHPData Types In PHP
Data Types In PHP
 
PHP 7
PHP 7PHP 7
PHP 7
 
PHP 7 Crash Course - php[world] 2015
PHP 7 Crash Course - php[world] 2015PHP 7 Crash Course - php[world] 2015
PHP 7 Crash Course - php[world] 2015
 

Similaire à PHP7.1 New Features & Performance

Php7 傳說中的第七隻大象
Php7 傳說中的第七隻大象Php7 傳說中的第七隻大象
Php7 傳說中的第七隻大象bobo52310
 
Php 5.6 vs Php 7 performance comparison
Php 5.6 vs Php 7 performance comparisonPhp 5.6 vs Php 7 performance comparison
Php 5.6 vs Php 7 performance comparisonTu Pham
 
PHP 7X New Features
PHP 7X New FeaturesPHP 7X New Features
PHP 7X New FeaturesThanh Tai
 
Typed Drupal - A great combination of Drupal 8 and PHP 7
Typed Drupal - A great combination of Drupal 8 and PHP 7Typed Drupal - A great combination of Drupal 8 and PHP 7
Typed Drupal - A great combination of Drupal 8 and PHP 7Aditya Ghan
 
Hsc IT 5. Server-Side Scripting (PHP).pdf
Hsc IT 5. Server-Side Scripting (PHP).pdfHsc IT 5. Server-Side Scripting (PHP).pdf
Hsc IT 5. Server-Side Scripting (PHP).pdfAAFREEN SHAIKH
 
What To Expect From PHP7
What To Expect From PHP7What To Expect From PHP7
What To Expect From PHP7Codemotion
 
php basic part one
php basic part onephp basic part one
php basic part onejeweltutin
 
Php tutorial from_beginner_to_master
Php tutorial from_beginner_to_masterPhp tutorial from_beginner_to_master
Php tutorial from_beginner_to_masterPrinceGuru MS
 
Preparing code for Php 7 workshop
Preparing code for Php 7 workshopPreparing code for Php 7 workshop
Preparing code for Php 7 workshopDamien Seguy
 
TAKING PHP SERIOUSLY - Keith Adams
TAKING PHP SERIOUSLY - Keith AdamsTAKING PHP SERIOUSLY - Keith Adams
TAKING PHP SERIOUSLY - Keith AdamsHermes Alves
 
JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...
JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...
JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...Jorge Hidalgo
 
Server Scripting Language -PHP
Server Scripting Language -PHPServer Scripting Language -PHP
Server Scripting Language -PHPDeo Shao
 
Module-4_WTA_PHP Class & Error Handling
Module-4_WTA_PHP Class & Error HandlingModule-4_WTA_PHP Class & Error Handling
Module-4_WTA_PHP Class & Error HandlingSIVAKUMAR V
 
The why and how of moving to php 8
The why and how of moving to php 8The why and how of moving to php 8
The why and how of moving to php 8Wim Godden
 

Similaire à PHP7.1 New Features & Performance (20)

Php7 傳說中的第七隻大象
Php7 傳說中的第七隻大象Php7 傳說中的第七隻大象
Php7 傳說中的第七隻大象
 
PHP7: Hello World!
PHP7: Hello World!PHP7: Hello World!
PHP7: Hello World!
 
Php 7 - YNS
Php 7 - YNSPhp 7 - YNS
Php 7 - YNS
 
Php 5.6 vs Php 7 performance comparison
Php 5.6 vs Php 7 performance comparisonPhp 5.6 vs Php 7 performance comparison
Php 5.6 vs Php 7 performance comparison
 
PHP 7X New Features
PHP 7X New FeaturesPHP 7X New Features
PHP 7X New Features
 
Typed Drupal - A great combination of Drupal 8 and PHP 7
Typed Drupal - A great combination of Drupal 8 and PHP 7Typed Drupal - A great combination of Drupal 8 and PHP 7
Typed Drupal - A great combination of Drupal 8 and PHP 7
 
Hsc IT 5. Server-Side Scripting (PHP).pdf
Hsc IT 5. Server-Side Scripting (PHP).pdfHsc IT 5. Server-Side Scripting (PHP).pdf
Hsc IT 5. Server-Side Scripting (PHP).pdf
 
Top ten of PHP 7.4
Top ten of PHP 7.4Top ten of PHP 7.4
Top ten of PHP 7.4
 
Migrating to PHP 7
Migrating to PHP 7Migrating to PHP 7
Migrating to PHP 7
 
Materi Dasar PHP
Materi Dasar PHPMateri Dasar PHP
Materi Dasar PHP
 
What To Expect From PHP7
What To Expect From PHP7What To Expect From PHP7
What To Expect From PHP7
 
php basic part one
php basic part onephp basic part one
php basic part one
 
Php tutorial from_beginner_to_master
Php tutorial from_beginner_to_masterPhp tutorial from_beginner_to_master
Php tutorial from_beginner_to_master
 
Preparing code for Php 7 workshop
Preparing code for Php 7 workshopPreparing code for Php 7 workshop
Preparing code for Php 7 workshop
 
TAKING PHP SERIOUSLY - Keith Adams
TAKING PHP SERIOUSLY - Keith AdamsTAKING PHP SERIOUSLY - Keith Adams
TAKING PHP SERIOUSLY - Keith Adams
 
JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...
JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...
JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...
 
Server Scripting Language -PHP
Server Scripting Language -PHPServer Scripting Language -PHP
Server Scripting Language -PHP
 
Module-4_WTA_PHP Class & Error Handling
Module-4_WTA_PHP Class & Error HandlingModule-4_WTA_PHP Class & Error Handling
Module-4_WTA_PHP Class & Error Handling
 
The why and how of moving to php 8
The why and how of moving to php 8The why and how of moving to php 8
The why and how of moving to php 8
 
php.pptx
php.pptxphp.pptx
php.pptx
 

Dernier

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 

Dernier (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 

PHP7.1 New Features & Performance

  • 1. PHP7.1 New Features & Performance @Laruence
  • 2. About Me • Author of Yaf, Yar, Yac, Yaconf, Taint, Lua, etc • Maintainer of APC, Zend Opcache, Msgpack • PHP core developer since 2011 • Zend consultant since 2013 • Core author of PHP7 • Chief Architect at Lianjia
  • 3. PHP • 20 years history • Most popular Web service program language • Over 82% sites are use PHP as server side program language • Latest version is PHP-7.1
  • 4. PHP71 • Nullable types • Void return type • Iterable pseudo-type • Class constant visibility modifiers • Specify keys in list() • Square bracket syntax for list() • Catching multiple exception types • Missing arguments Excetpion • Warn about invalid strings in arithmetic • Generalize support of negative string offsets • ….
  • 5. Nullable types • An enhancement for typehints return type parameters
  • 6. Void return types • An enhancement for return type hint
  • 7. Iterable Pseudo type • Iterable accepts any array or object implementing Traversable • Iterable can also be used in return type
  • 8. Class constant visibility modifiers • Support class constant visibility
  • 9. Specify keys in list() • An enhancement for list() • Also works in foreach specify keys in list specify keys in list with foreach
  • 10. Square backtrace for list() • Continuation syntax for short array syntax introduced in 5.4 • Also works in foreach too
  • 11. Catching multiply exception types • Allow catching multiply exception types in single catch normal way PHP71 way
  • 12. Missing arguments exception • Disable calling “user” functions with insufficient actual parameters before 71 after 71
  • 13. Warn about invalid strings in arithmetic • Produce E_NOTICE or E_WARNING when using invalid numeric strings with arithmetic operators
  • 14. Generalize support of negative string offsets • Support of negative string offsets when it make sense
  • 16. PHP71 Performance • Over 10% Perfromance improvement 0.901 1.022 2.991 3.045 3.102 3.762 5.318 6.527 13.424 0 2 4 6 8 10 12 14 16 PHP-7.1 PHP-7.0 PHP-5.6 PHP-5.5 PHP-5.4 PHP-5.3 PHP-5.2 PHP-5.1 PHP-5.0 bench.php
  • 17. Type specific opcode handlers ZEND_ADD ZEND_ADD_LONG_LONG
  • 18. Type Inference system • Part work of our JIT in 2013 normal branch loop
  • 19. Static Single-Assignment Form • An intermediate representation, variable is assigned exactly once • Explicit use-def chain
  • 20. Type Inference • What’s ? ’s type at ? point • Computed in compiling time
  • 21. Type Specific opcode handler • Use type specific opcode handler if possible
  • 22. Type Inference system • A tedious work • And we can only get ~30% type-infos in WP
  • 23. Type Specific opcode handlers • ZEND_ADD(SUB|MUL) • ZEND_PRE_INC(DEC) • ZEND_POST_INC(DEC) • ZEND_IS_(NOT_)EQUAL • ZEND_IS_SMALLER(_OR_EQUAL) • ZEND_QM_ASSIGN • ZEND_SEND_VAR(_EX) • ZEND_FETCH_DIM_R

  • 24. And dozens of minor improvements • More packed array constructions • Constant propagation based on DFA • Return type checks eliding • dozens of minor improvements even I can not recall
  • 25. Q&A