SlideShare a Scribd company logo
Laruence
A BRIEF TO PHP 7.3
NEW FEATURES AND PERFORMANCE
PHP DEVELOPER
SELF INTRODUCTION
• Author of Yaf, Yar, Yac, Yaconf, Taint Projects
• Maintainer of Opcache, Msgpack Projects
• PHP core developer since 2011
• Zend consultant since 2013
• PHP7 core developer
• Chief software architect at Lianjia since 2015
A PROGRAMER
PHP HISTORY
• Created in 1994 by Rasmus Lerdorf
• 20+ years programming language
• Most popular web service program language
• PHP7 is released at 3 Dec 2015
• Latest version is PHP7.2.5
BORN FOR WEB
PHP
ASP.NET
Java
Static files
ColdFusion
Ruby
Perl
JavaScript
Python
Erlang
83.5%
13.4%
2.3%
1.9%
0.6%
0.6%
0.4%
0.4%
0.2%
0.1%
W3Techs.com,1 April 2018
HEREDOC AND NEWDOC
• The Ending token no loner needs to be the first strings of line
• The ending Token can be indented
• the Exact number of spaces/tabs used in the ending token will be striped
function example($arr) {
$out = "";
foreach($arr as $str) {
$out .= <<<DOC
repeat {$str}
DOC;
}
return $arr;
}
function example($arr) {
$out = "";
foreach($arr as $str) {
$out .= <<<DOC
repeat {$str}
DOC;
}
return $arr;
}
TRAILING COMMA IN FUNC CALLS
• Allow trailing comma in function and method calls
• Only one extra comma are allowed
• you can not use this in function/method declarations
func_call(
$argument1,
$argument2,
$argument3,
$argument4,
);
function func_call($num1, $num2, $num3, $num4) {
return $num1 + $num2 + $num3 + $mum4;
}
REFERENCE IN LIST
• Items in list can be assigned by reference
$animal = ['dog', 'cat'];
list($a, &$b) = $animal;
$b = "mokey";
var_dump($animal);
//output:
//array(2) {
// [0]=>
// string(3) "dog"
// [1]=>
// &string(5) "mokey"
//}
$animal = ['dog', 'cat'];
[$a, &$b] = $animal;
$b = "mokey";
var_dump($animal);
//output:
//array(2) {
// [0]=>
// string(3) "dog"
// [1]=>
// &string(5) "mokey"
//}
HRTIME
• Hrtime is a high-resolution monotonic timer
• it doesn’t depends on the system clock
$start = hrtime(true);
//...........
$end = hrtime(true);
$elapsed = $end - $start;
HRTIME
• Hrtime is a high-resolution monotonic timer
• it doesn’t depends on the system clock
$start = hrtime(true);
//...........
$end = hrtime(true);
$elapsed = $end - $start;
MULTIPLY NEW FEATURES & BUGFIX
• Add net_get_interfaces()
• instanceof now allows literals as the first operand
• NEW flag JSON_THROW_ON_ERROR, json_encode/decode could throw exception instead warning now
• Added is_countable() function, to check whether a value may be passed tocount()
• Multiply new methods added in GMP
• https://github.com/php/php-src/blob/master/UPGRADING
FASTER NEW GC
• Composer GC performance problem REsolved
• Multiple bugs fixed in the mean time
FASTER NEW GC
• Removed double link list, plain array instead
• Dynamically resize-able root buffers
• Dynamically GC threshold adjustment
• Reduced gc_buffer_root size from 32 to 8 (x86_64)
• 5x boost performance in tests
typedef struct _gc_root_buffer {
zend_refcounted *ref;
struct _gc_root_buffer *next;
struct _gc_root_buffer *prev;
uint32_t refcount;
} gc_root_buffer;
typedef struct _gc_root_buffer {
zend_refcounted *ref;
} gc_root_buffer;
SIMD OPTIMIZATION FRAMEWORK
• runtime cpu feature detection(sse, avx)
• zend_cpu_support_sse42
• CPU specific version runtime selection (ifunc/function pointer)
• addslashes
• 2x+ performance improved in test
BASE64 SIMD OPTIMIZATION
• base64_encode/decode optimized
• 3X performance improved in test (sse42)
• http://www.alfredklomp.com/programming/sse-base64/
$retry = 100;
$start = microtime(true);
while (--$retry) {
$length = (int)(1000/$retry);
$str = file_get_contents("/dev/urandom", false, NULL, 0, $length);
//echo "String lenght: ", $length, "n";
$time = microtime(true);
for ($i = 0; $i < 1000000; $i++) {
base64_encode($str);
}
$time = microtime(true) - $time;
//echo "Used time: ", $time , "s", "n";
}
echo "Total used time: ", microtime(true) - $start, "sn";
PERFORMANCE EVOLUTION
BENCH.PHP
13
7
5
4
3 3 3
1 1 1 1
0
3.5
7
10.5
14
17.5
PHP-5.0 PHP-5.1 PHP-5.2 PHP-5.3 PHP-5.4 PHP-5.5 PHP-5.6 PHP-7.0 PHP-7.1 PHP-7.2 PHP-7.3
WORDPRESS HOMEPAGE QPS
0 0
75 82
107 110 112
317 321
330
338
0
100
200
300
400
PHP-5.0 PHP-5.1 PHP-5.2 PHP-5.3 PHP-5.4 PHP-5.5 PHP-5.6 PHP-7.0 PHP-7.1 PHP-7.2 PHP-7.3
PERFORMANCE EVOLUTION
PHP 7.3 ROADMAP
• Jun 2018, Alpha1
• Jul 2018, Beta
• Aug 2018, RC
• Nov 2018, GA
P H P : K E E P G E T T I N G F A S T E R
THANKS

More Related Content

What's hot

Preparing code for Php 7 workshop
Preparing code for Php 7 workshopPreparing code for Php 7 workshop
Preparing code for Php 7 workshop
Damien Seguy
 
CPAN Curation
CPAN CurationCPAN Curation
CPAN Curation
neilbowers
 
The Php Life Cycle
The Php Life CycleThe Php Life Cycle
The Php Life Cycle
Xinchen Hui
 
Reviewing CPAN modules
Reviewing CPAN modulesReviewing CPAN modules
Reviewing CPAN modules
neilbowers
 
PHP 5.6 New and Deprecated Features
PHP 5.6  New and Deprecated FeaturesPHP 5.6  New and Deprecated Features
PHP 5.6 New and Deprecated Features
Mark Niebergall
 
Laravel
LaravelLaravel
Laravel
SitaPrajapati
 
Laravel Webcon 2015
Laravel Webcon 2015Laravel Webcon 2015
Laravel Webcon 2015
Tim Bracken
 
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
daylerees
 
Php7 hhvm and co
Php7 hhvm and coPhp7 hhvm and co
Php7 hhvm and co
Pierre Joye
 
Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processor
Siddique Ibrahim
 
Creating Perl modules with Dist::Zilla
Creating Perl modules with Dist::ZillaCreating Perl modules with Dist::Zilla
Creating Perl modules with Dist::Zilla
Mark Gardner
 
How PHP Works ?
How PHP Works ?How PHP Works ?
How PHP Works ?
Ravi Raj
 
Hacking with hhvm
Hacking with hhvmHacking with hhvm
Hacking with hhvm
Elizabeth Smith
 
Speed geeking-lotusscript
Speed geeking-lotusscriptSpeed geeking-lotusscript
Speed geeking-lotusscript
Bill Buchan
 
Laravel Level 1 (The Basic)
Laravel Level 1 (The Basic)Laravel Level 1 (The Basic)
Laravel Level 1 (The Basic)
Kriangkrai Chaonithi
 
Intro to Laravel
Intro to LaravelIntro to Laravel
Intro to Laravel
Azukisoft Pte Ltd
 
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
 
Shootout! template engines on the jvm
Shootout! template engines on the jvmShootout! template engines on the jvm
Shootout! template engines on the jvm
NLJUG
 
Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
Mayank Panchal
 
Laravel level 0 (introduction)
Laravel level 0 (introduction)Laravel level 0 (introduction)
Laravel level 0 (introduction)
Kriangkrai Chaonithi
 

What's hot (20)

Preparing code for Php 7 workshop
Preparing code for Php 7 workshopPreparing code for Php 7 workshop
Preparing code for Php 7 workshop
 
CPAN Curation
CPAN CurationCPAN Curation
CPAN Curation
 
The Php Life Cycle
The Php Life CycleThe Php Life Cycle
The Php Life Cycle
 
Reviewing CPAN modules
Reviewing CPAN modulesReviewing CPAN modules
Reviewing CPAN modules
 
PHP 5.6 New and Deprecated Features
PHP 5.6  New and Deprecated FeaturesPHP 5.6  New and Deprecated Features
PHP 5.6 New and Deprecated Features
 
Laravel
LaravelLaravel
Laravel
 
Laravel Webcon 2015
Laravel Webcon 2015Laravel Webcon 2015
Laravel Webcon 2015
 
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
 
Php7 hhvm and co
Php7 hhvm and coPhp7 hhvm and co
Php7 hhvm and co
 
Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processor
 
Creating Perl modules with Dist::Zilla
Creating Perl modules with Dist::ZillaCreating Perl modules with Dist::Zilla
Creating Perl modules with Dist::Zilla
 
How PHP Works ?
How PHP Works ?How PHP Works ?
How PHP Works ?
 
Hacking with hhvm
Hacking with hhvmHacking with hhvm
Hacking with hhvm
 
Speed geeking-lotusscript
Speed geeking-lotusscriptSpeed geeking-lotusscript
Speed geeking-lotusscript
 
Laravel Level 1 (The Basic)
Laravel Level 1 (The Basic)Laravel Level 1 (The Basic)
Laravel Level 1 (The Basic)
 
Intro to Laravel
Intro to LaravelIntro to Laravel
Intro to Laravel
 
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)
 
Shootout! template engines on the jvm
Shootout! template engines on the jvmShootout! template engines on the jvm
Shootout! template engines on the jvm
 
Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
 
Laravel level 0 (introduction)
Laravel level 0 (introduction)Laravel level 0 (introduction)
Laravel level 0 (introduction)
 

Similar to A brief to PHP 7.3

これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
goccy
 
Everything new with PHP 7.3
Everything new with PHP 7.3Everything new with PHP 7.3
Everything new with PHP 7.3
Damien Seguy
 
What to expect from Java 9
What to expect from Java 9What to expect from Java 9
What to expect from Java 9
Ivan Krylov
 
Intro to CakePHP
Intro to CakePHPIntro to CakePHP
Intro to CakePHP
Walther Lalk
 
Modern PHP
Modern PHPModern PHP
Modern PHP
Simon Jones
 
Tech Days 2015: AdaCore Roadmap
Tech Days 2015: AdaCore RoadmapTech Days 2015: AdaCore Roadmap
Tech Days 2015: AdaCore Roadmap
AdaCore
 
What is new in PHP 5.5 - HuyenNT
What is new in PHP 5.5 - HuyenNTWhat is new in PHP 5.5 - HuyenNT
What is new in PHP 5.5 - HuyenNT
Framgia Vietnam
 
Golang
GolangGolang
Golang
GolangGolang
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
Tu Pham
 
Eclipse pdt indigo release review
Eclipse pdt   indigo release reviewEclipse pdt   indigo release review
Eclipse pdt indigo release review
Giang Nguyễn
 
PHP 7X New Features
PHP 7X New FeaturesPHP 7X New Features
PHP 7X New Features
Thanh Tai
 
Wc13
Wc13Wc13
Php 5.6 From the Inside Out
Php 5.6 From the Inside OutPhp 5.6 From the Inside Out
Php 5.6 From the Inside Out
Ferenc Kovács
 
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMP
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMPInria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMP
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMP
Stéphanie Roger
 
They why behind php frameworks
They why behind php frameworksThey why behind php frameworks
They why behind php frameworks
Kirk Madera
 
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON
 
DevOps in PHP environment
DevOps in PHP environmentDevOps in PHP environment
DevOps in PHP environment
Evaldo Felipe
 
Nginx pres
Nginx presNginx pres
Nginx pres
James Fuller
 
Building your first aplication using Apache Apex
Building your first aplication using Apache ApexBuilding your first aplication using Apache Apex
Building your first aplication using Apache Apex
Yogi Devendra Vyavahare
 

Similar to A brief to PHP 7.3 (20)

これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)これからのPerlプロダクトのかたち(YAPC::Asia 2013)
これからのPerlプロダクトのかたち(YAPC::Asia 2013)
 
Everything new with PHP 7.3
Everything new with PHP 7.3Everything new with PHP 7.3
Everything new with PHP 7.3
 
What to expect from Java 9
What to expect from Java 9What to expect from Java 9
What to expect from Java 9
 
Intro to CakePHP
Intro to CakePHPIntro to CakePHP
Intro to CakePHP
 
Modern PHP
Modern PHPModern PHP
Modern PHP
 
Tech Days 2015: AdaCore Roadmap
Tech Days 2015: AdaCore RoadmapTech Days 2015: AdaCore Roadmap
Tech Days 2015: AdaCore Roadmap
 
What is new in PHP 5.5 - HuyenNT
What is new in PHP 5.5 - HuyenNTWhat is new in PHP 5.5 - HuyenNT
What is new in PHP 5.5 - HuyenNT
 
Golang
GolangGolang
Golang
 
Golang
GolangGolang
Golang
 
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
 
Eclipse pdt indigo release review
Eclipse pdt   indigo release reviewEclipse pdt   indigo release review
Eclipse pdt indigo release review
 
PHP 7X New Features
PHP 7X New FeaturesPHP 7X New Features
PHP 7X New Features
 
Wc13
Wc13Wc13
Wc13
 
Php 5.6 From the Inside Out
Php 5.6 From the Inside OutPhp 5.6 From the Inside Out
Php 5.6 From the Inside Out
 
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMP
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMPInria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMP
Inria Tech Talk : Comment améliorer la qualité de vos logiciels avec STAMP
 
They why behind php frameworks
They why behind php frameworksThey why behind php frameworks
They why behind php frameworks
 
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
44CON 2014 - Pentesting NoSQL DB's Using NoSQL Exploitation Framework, Franci...
 
DevOps in PHP environment
DevOps in PHP environmentDevOps in PHP environment
DevOps in PHP environment
 
Nginx pres
Nginx presNginx pres
Nginx pres
 
Building your first aplication using Apache Apex
Building your first aplication using Apache ApexBuilding your first aplication using Apache Apex
Building your first aplication using Apache Apex
 

More from Xinchen Hui

PHP7 - For Its Best Performance
PHP7 - For Its Best PerformancePHP7 - For Its Best Performance
PHP7 - For Its Best Performance
Xinchen Hui
 
A History of PHP
A History of PHPA History of PHP
A History of PHP
Xinchen Hui
 
微博Lamp性能优化之路(2014)
微博Lamp性能优化之路(2014)微博Lamp性能优化之路(2014)
微博Lamp性能优化之路(2014)
Xinchen Hui
 
Weibo lamp improvements
Weibo lamp improvementsWeibo lamp improvements
Weibo lamp improvements
Xinchen Hui
 
Php 5.4 performance
Php 5.4 performancePhp 5.4 performance
Php 5.4 performance
Xinchen Hui
 
China PHP Technology Summit 2011 ppt
China PHP Technology Summit 2011 pptChina PHP Technology Summit 2011 ppt
China PHP Technology Summit 2011 pptXinchen Hui
 
Php performance
Php performancePhp performance
Php performance
Xinchen Hui
 

More from Xinchen Hui (7)

PHP7 - For Its Best Performance
PHP7 - For Its Best PerformancePHP7 - For Its Best Performance
PHP7 - For Its Best Performance
 
A History of PHP
A History of PHPA History of PHP
A History of PHP
 
微博Lamp性能优化之路(2014)
微博Lamp性能优化之路(2014)微博Lamp性能优化之路(2014)
微博Lamp性能优化之路(2014)
 
Weibo lamp improvements
Weibo lamp improvementsWeibo lamp improvements
Weibo lamp improvements
 
Php 5.4 performance
Php 5.4 performancePhp 5.4 performance
Php 5.4 performance
 
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
 

Recently uploaded

Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 

Recently uploaded (20)

Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 

A brief to PHP 7.3

  • 1. Laruence A BRIEF TO PHP 7.3 NEW FEATURES AND PERFORMANCE PHP DEVELOPER
  • 2. SELF INTRODUCTION • Author of Yaf, Yar, Yac, Yaconf, Taint Projects • Maintainer of Opcache, Msgpack Projects • PHP core developer since 2011 • Zend consultant since 2013 • PHP7 core developer • Chief software architect at Lianjia since 2015 A PROGRAMER
  • 3. PHP HISTORY • Created in 1994 by Rasmus Lerdorf • 20+ years programming language • Most popular web service program language • PHP7 is released at 3 Dec 2015 • Latest version is PHP7.2.5 BORN FOR WEB PHP ASP.NET Java Static files ColdFusion Ruby Perl JavaScript Python Erlang 83.5% 13.4% 2.3% 1.9% 0.6% 0.6% 0.4% 0.4% 0.2% 0.1% W3Techs.com,1 April 2018
  • 4. HEREDOC AND NEWDOC • The Ending token no loner needs to be the first strings of line • The ending Token can be indented • the Exact number of spaces/tabs used in the ending token will be striped function example($arr) { $out = ""; foreach($arr as $str) { $out .= <<<DOC repeat {$str} DOC; } return $arr; } function example($arr) { $out = ""; foreach($arr as $str) { $out .= <<<DOC repeat {$str} DOC; } return $arr; }
  • 5. TRAILING COMMA IN FUNC CALLS • Allow trailing comma in function and method calls • Only one extra comma are allowed • you can not use this in function/method declarations func_call( $argument1, $argument2, $argument3, $argument4, ); function func_call($num1, $num2, $num3, $num4) { return $num1 + $num2 + $num3 + $mum4; }
  • 6. REFERENCE IN LIST • Items in list can be assigned by reference $animal = ['dog', 'cat']; list($a, &$b) = $animal; $b = "mokey"; var_dump($animal); //output: //array(2) { // [0]=> // string(3) "dog" // [1]=> // &string(5) "mokey" //} $animal = ['dog', 'cat']; [$a, &$b] = $animal; $b = "mokey"; var_dump($animal); //output: //array(2) { // [0]=> // string(3) "dog" // [1]=> // &string(5) "mokey" //}
  • 7. HRTIME • Hrtime is a high-resolution monotonic timer • it doesn’t depends on the system clock $start = hrtime(true); //........... $end = hrtime(true); $elapsed = $end - $start;
  • 8. HRTIME • Hrtime is a high-resolution monotonic timer • it doesn’t depends on the system clock $start = hrtime(true); //........... $end = hrtime(true); $elapsed = $end - $start;
  • 9. MULTIPLY NEW FEATURES & BUGFIX • Add net_get_interfaces() • instanceof now allows literals as the first operand • NEW flag JSON_THROW_ON_ERROR, json_encode/decode could throw exception instead warning now • Added is_countable() function, to check whether a value may be passed tocount() • Multiply new methods added in GMP • https://github.com/php/php-src/blob/master/UPGRADING
  • 10. FASTER NEW GC • Composer GC performance problem REsolved • Multiple bugs fixed in the mean time
  • 11. FASTER NEW GC • Removed double link list, plain array instead • Dynamically resize-able root buffers • Dynamically GC threshold adjustment • Reduced gc_buffer_root size from 32 to 8 (x86_64) • 5x boost performance in tests typedef struct _gc_root_buffer { zend_refcounted *ref; struct _gc_root_buffer *next; struct _gc_root_buffer *prev; uint32_t refcount; } gc_root_buffer; typedef struct _gc_root_buffer { zend_refcounted *ref; } gc_root_buffer;
  • 12. SIMD OPTIMIZATION FRAMEWORK • runtime cpu feature detection(sse, avx) • zend_cpu_support_sse42 • CPU specific version runtime selection (ifunc/function pointer) • addslashes • 2x+ performance improved in test
  • 13. BASE64 SIMD OPTIMIZATION • base64_encode/decode optimized • 3X performance improved in test (sse42) • http://www.alfredklomp.com/programming/sse-base64/ $retry = 100; $start = microtime(true); while (--$retry) { $length = (int)(1000/$retry); $str = file_get_contents("/dev/urandom", false, NULL, 0, $length); //echo "String lenght: ", $length, "n"; $time = microtime(true); for ($i = 0; $i < 1000000; $i++) { base64_encode($str); } $time = microtime(true) - $time; //echo "Used time: ", $time , "s", "n"; } echo "Total used time: ", microtime(true) - $start, "sn";
  • 14. PERFORMANCE EVOLUTION BENCH.PHP 13 7 5 4 3 3 3 1 1 1 1 0 3.5 7 10.5 14 17.5 PHP-5.0 PHP-5.1 PHP-5.2 PHP-5.3 PHP-5.4 PHP-5.5 PHP-5.6 PHP-7.0 PHP-7.1 PHP-7.2 PHP-7.3
  • 15. WORDPRESS HOMEPAGE QPS 0 0 75 82 107 110 112 317 321 330 338 0 100 200 300 400 PHP-5.0 PHP-5.1 PHP-5.2 PHP-5.3 PHP-5.4 PHP-5.5 PHP-5.6 PHP-7.0 PHP-7.1 PHP-7.2 PHP-7.3 PERFORMANCE EVOLUTION
  • 16. PHP 7.3 ROADMAP • Jun 2018, Alpha1 • Jul 2018, Beta • Aug 2018, RC • Nov 2018, GA
  • 17. P H P : K E E P G E T T I N G F A S T E R THANKS