SlideShare a Scribd company logo
1 of 62
v
PHP-7.X
Vu Thanh Tai - 15/06/2018
OVERVIEW
• Performances
• Changes & Enhancements
• New Features
• Deprecations
• PHP 7.0.X
• PHP 7.1.X
• PHP 7.2.X
PHP 7.X
PERFORMANCES
Performances
● Machine used: 8x Intel(R) Xeon(R) CPU @ 2.20GHz (Powered by Google Cloud Platform
and running in an isolated container)
● OS: Ubuntu 16.04.3 LTS
● Docker Stack: Debian 8, Nginx 1.13.8, MariaDB 10.1.31
● PHP Engines: 5.6, 7.0, 7.1, 7.2
● HHVM: 3.24.2
● OPCache: For WordPress, Joomla, and Drupal, we used the official Docker image. For the
rest we used the same image setup with the OPcache enabled using the following
recommended php.ini settings.
Performances
● WordPress 4.9.4 PHP 5.6 benchmark
results: 49.18 req/sec
● WordPress 4.9.4 PHP 7.0 benchmark
results: 133.55 req/sec
● WordPress 4.9.4 PHP 7.1 benchmark
results: 134.24 req/sec
● WordPress 4.9.4 PHP 7.2 benchmark
results: 148.80 req/sec 🏆
● WordPress 4.9.4 HHVM benchmark
results: 144.76 req/sec
Performances
● WordPress 4.9.4 + WooCommerce 3.3.1
PHP 5.6 benchmark results: 34.47 req/sec
● WordPress 4.9.4 + WooCommerce 3.3.1
PHP 7.0 benchmark results: 84.89 req/sec
● WordPress 4.9.4 + WooCommerce 3.3.1
PHP 7.1 benchmark results: 86.04 req/sec
● WordPress 4.9.4 + WooCommerce 3.3.1
PHP 7.2 benchmark results: 92.60 req/sec
🏆
● WordPress 4.9.4 + WooCommerce 3.3.1
HHVM benchmark results: 69.58 req/sec
Performances
● Drupal 8.4.4 PHP 5.6 benchmark
results: 7.05 req/sec
● Drupal 8.4.4 PHP 7.0 benchmark
results: 15.94 req/sec
● Drupal 8.4.4 PHP 7.1 benchmark
results: 19.15 req/sec
● Drupal 8.4.4 PHP 7.2 benchmark
results: (not supported)
● Drupal 8.4.4 HHVM benchmark results:
19.57 req/sec 🏆
Performances
● Joomla! 3.8.5 PHP 5.6 benchmark results:
26.42 req/sec
● Joomla! 3.8.5 PHP 7.0 benchmark results:
41.46 req/sec
● Joomla! 3.8.5 PHP 7.1 benchmark results:
41.17 req/sec
● Joomla! 3.8.5 PHP 7.2 benchmark results:
42.36 req/sec
● Joomla! 3.8.5 HHVM benchmark results:
51.84 req/sec 🏆
Performances
● Magento 2 (CE) 2.1.11 PHP 5.6 benchmark
results: 10.75 req/sec
● Magento 2 (CE) 2.1.11 PHP 7.0 benchmark
results: 20.87 req/sec
● Magento 2 (CE) 2.1.11 PHP 7.1 benchmark
results: 29.84 req/sec 🏆
● Magento 2 (CE) 2.1.11 PHP 7.2 benchmark
results: not supported
● Magento 2 (CE) 2.1.11 HHVM benchmark
results: not supported
Performances
● Laravel 5.4.36 PHP 5.6 benchmark
results: 66.57 req/sec
● Laravel 5.4.36 PHP 7.0 benchmark
results: 114.55 req/sec
● Laravel 5.4.36 PHP 7.1 benchmark
results: 113.26 req/sec
● Laravel 5.4.36 PHP 7.2 benchmark
results: 114.04 req/sec
● Laravel 5.4.36 HHVM benchmark results:
394.31 req/sec 🏆
Performances
● Laravel 5.6 PHP 5.6 benchmark results:
not supported
● Laravel 5.6 PHP 7.0 benchmark results:
not supported
● Laravel 5.6 PHP 7.1 benchmark results:
411.39 req/sec
● Laravel 5.6 PHP 7.2 benchmark results:
442.17 req/sec 🏆
● Laravel 5.6 HHVM benchmark results: not
supported
Performances
● Symfony 3.3.6 PHP 5.6 benchmark results:
81.78 req/sec
● Symfony 3.3.6 PHP 7.0 benchmark results:
184.15 req/sec
● Symfony 3.3.6 PHP 7.1 benchmark results:
187.60 req/sec
● Symfony 3.3.6 PHP 7.2 benchmark results:
196.94 req/sec 🏆
● Symfony 3.3.6 HHVM benchmark results:
not supported
Performances
● Symfony 4.0.1 PHP 5.6 benchmark results:
not supported
● Symfony 4.0.1 PHP 7.0 benchmark results:
not supported
● Symfony 4.0.1 PHP 7.1 benchmark results:
188.12 req/sec
● Symfony 4.0.1 PHP 7.2 benchmark results:
197.17 req/sec 🏆
● Symfony 4.0.1 HHVM benchmark results:
not supported
CHANGES & ENHANCEMENTS
Changes & Enhancements
PHP
● PHP 5:
Parser Opcodes Execution
PHP
● PHP 7:
Parser Opcodes
Execution
AST
PHP 7.0.X
NEW FEATURES
New Features - PHP 7.0.X
• PHP 7.0.X released 03/12/2015.
• PHP 7.0.X comes with a new version of the Zend Engine.
New Features - PHP 7.0.X
New Features - PHP 7.0.X -
Scalar type declarations:
PHP 5.X PHP 7.0.X
New Features - PHP 7.0.X -
Scalar type declarations:
Type
Declaration
int float string bool object
int yes yes* yes^ yes no
float yes yes yes^ yes no
string yes^ yes yes yes yes~
bool yes yes yes yes no
* Only non-NaN floats between PHP_INT_MIN and PHP_INT_MAX accepted.
^ If it’s a numeric string
~ Only if object has a toString() method
New Features - PHP 7.0.X -
Scalar type declarations:
● By default, PHP will coerce values of the wrong type into the expected scalar type if possible. For
example, a function that is given an integer for a parameter that expects a string will get a variable of
type string.
Config strict types:
New Features - PHP 7.0.X -
Scalar type declarations:
Example with strict mode:
New Features - PHP 7.0.X -
Return type declarations:
● PHP 7 adds support for return type declarations. Similarly to argument type declarations, return type
declarations specify the type of the value that will be returned from a function. The same types are
available for return type declarations as are available for argument type declarations.
New Features - PHP 7.0.X -
Null coalescing operator:
● The null coalescing operator (??) has been added as syntactic sugar for the common case of needing to
use a ternary in conjunction with isset(). It returns its first operand if it exists and is not NULL; otherwise
it returns its second operand.
New Features - PHP 7.0.X -
Spaceship operator:
● The spaceship operator is used for comparing two expressions. It returns -1, 0 or 1 when $a is
respectively less than, equal to, or greater than $b. Comparisons are performed according to PHP's
usual type comparison rules.
New Features - PHP 7.0.X -
Constant arrays using define():
● Array constants can now be defined with define(). In PHP 5.6, they could only be defined with const.
New Features - PHP 7.0.X -
Anonymous classes:
● Support for anonymous classes has been
added via new class. These can be used in
place of full class definitions for throwaway
objects:
New Features - PHP 7.0.X -
Closure::call():
● Closure::call() is a more performant, shorthand way of temporarily binding an object scope to a closure
and invoking it.
New Features - PHP 7.0.X -
Filtered unserialize():
● This feature seeks to provide better security when unserializing objects on untrusted data. It prevents
possible code injections by enabling the developer to whitelist classes that can be unserialized.
New Features - PHP 7.0.X -
Group use declarations:
● Classes, functions and constants being imported from the same namespace can now be grouped
together in a single use statement.
New Features - PHP 7.0.X -
Other Features:
● Generator Return Expressions
● Integer division with intdiv()
● preg_replace_callback_array()
● IntlChar
● Unicode codepoint escape syntax
PHP 7.0.X
DEPRECATIONS & REMOVALS
Deprecated - PHP 7.0.X -
PHP 4 style constructors:
● PHP 4 style constructors (methods that have the same name as the class they are defined in) are
deprecated, and will be removed in the future. PHP 7 will emit E_DEPRECATED if a PHP4 constructor
is the only constructor defined within a class. Classes that implement a __construct() method are
unaffected.
Deprecated - PHP 7.0.X -
Static calls to non-static methods:
● Static calls to methods that are not declared static are deprecated, and may be removed in the future.
Deprecated - PHP 7.0.X -
password_hash() salt option:
● The salt option for the password_hash() function has been deprecated to prevent developers from
generating their own (usually insecure) salts. The function itself generates a cryptographically secure
salt when no salt is provided by the developer - therefore custom salt generation should not be needed.
Deprecated - PHP 7.0.X -
Other Deprecated:
● capture_session_meta SSL context option.
● ldap_soft() function in library LDAP.
PHP 7.1.X
NEW FEATURES
New Features - PHP 7.1.X
PHP 7.1.X released 01/12/2016.
New Features - PHP 7.1.X
Nullable types:
● Type declarations for parameters and return values can now be marked as nullable by prefixing the
type name with a question mark. This signifies that as well as the specified type, NULL can be passed
as an argument, or returned as a value, respectively.
New Features - PHP 7.1.X -
Void functions:
● Type declarations for parameters and return values can now be marked as nullable by prefixing the
type name with a question mark. This signifies that as well as the specified type, NULL can be passed
as an argument, or returned as a value, respectively.
New Features - PHP 7.1.X -
Class constant visibility:
● Support for specifying the visibility of class constants has been added.
New Features - PHP 7.1.X -
Multi catch exception handling:
● Multiple exceptions per catch block may now be specified using the pipe character (|). This is useful for
when different exceptions from different class hierarchies are handled the same.
New Features - PHP 7.1.X -
Support for keys in list():
● You can now specify keys in list(), or its new shorthand [] syntax. This enables destructuring of arrays
with non-integer or non-sequential keys.
New Features - PHP 7.1.X -
Support for negative string offsets:
● Support for negative string offsets has been added to the string manipulation functions accepting
offsets, as well as to string indexing with [] or {}. In such cases, a negative offset is interpreted as being
an offset from the end of the string.
Deprecated - PHP 7.1.X -
Other Deprecated:
● iterable pseudo-type.
● Support for AEAD in ext/openssl.
● Convert callables to Closures with Closure::fromCallable()
PHP 7.1.X
DEPRECATIONS & REMOVALS
Deprecated - PHP 7.1.X -
● Eval option for mb_ereg_replace() and mb_eregi_replace()
● ext/mcrypt
PHP 7.2.X
NEW FEATURES
New Features - PHP 7.2.X
PHP 7.2.X released 30/11/2017.
New Features - PHP 7.2.X -
New object type:
● A new type, object, has been introduced that can be used for (contravariant) parameter typing and
(covariant) return typing of any objects.
New Features - PHP 7.2.X -
Abstract method overriding:
● Abstract methods can now be overridden when an abstract class extends another abstract class.
New Features - PHP 7.2.X -
Parameter type widening:
● Parameter types from overridden methods and from interface implementations may now be omitted.
This is still in compliance with LSP, since parameters types are contravariant.
New Features - PHP 7.2.X -
Password hashing with Argon2:
● Argon2 has been added to the password hashing API, where the following constants have been
exposed:
○ PASSWORD_ARGON2I
○ PASSWORD_ARGON2_DEFAULT_MEMORY_COST
○ PASSWORD_ARGON2_DEFAULT_TIME_COST
○ PASSWORD_ARGON2_DEFAULT_THREADS
New Features - PHP 7.2.X -
Other New Features:
● SQLite3 allows writing BLOBs.
● Oracle OCI8 Transparent Application Failover Callbacks.
● Enhancements to the ZIP extension.
● proc_nice() support on Windows.
PHP 7.2.X
DEPRECATIONS & REMOVALS
Deprecates - PHP 7.2.X -
__autoload() method:
● The __autoload() method has been deprecated because it is inferior to spl_autoload_register() (due to
it not being able to chain autoloaders), and there is no interoperability between the two autoloading
styles.
Deprecates - PHP 7.2.X -
● create_function().
● parse_str() without a second argument.
● gmp_random() function.
● each() function.
● assert() with a string argument.
● ...
Deprecates - PHP 7.2.X -
__autoload() method:
● The __autoload() method has been deprecated because it is inferior to spl_autoload_register() (due to
it not being able to chain autoloaders), and there is no interoperability between the two autoloading
styles.
References
http://php.net/
www.phproundtable.com
https://kinsta.com/blog/php-7-hhvm-benchmarks/
Php 5.6 vs Php 7 performance comparison
Php 5.6 vs Php 7 performance comparison

More Related Content

What's hot

CLI, the other SAPI
CLI, the other SAPICLI, the other SAPI
CLI, the other SAPICombell NV
 
typemap in Perl/XS
typemap in Perl/XS  typemap in Perl/XS
typemap in Perl/XS charsbar
 
What you need to remember when you upload to CPAN
What you need to remember when you upload to CPANWhat you need to remember when you upload to CPAN
What you need to remember when you upload to CPANcharsbar
 
Zend Framework 2 Components
Zend Framework 2 ComponentsZend Framework 2 Components
Zend Framework 2 ComponentsShawn Stratton
 
Metamodeling of custom Pharo images
 Metamodeling of custom Pharo images Metamodeling of custom Pharo images
Metamodeling of custom Pharo imagesESUG
 
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 2016Eric Poe
 
Laravel 4 package development
Laravel 4 package developmentLaravel 4 package development
Laravel 4 package developmentTihomir Opačić
 
Hyperledger 구조 분석
Hyperledger 구조 분석Hyperledger 구조 분석
Hyperledger 구조 분석Jongseok Choi
 
YAPC::NA 2007 - An Introduction To Perl Critic
YAPC::NA 2007 - An Introduction To Perl CriticYAPC::NA 2007 - An Introduction To Perl Critic
YAPC::NA 2007 - An Introduction To Perl Criticjoshua.mcadams
 
Automatic PHP 7 Compatibility Checking Using php7cc (and PHPCompatibility)
Automatic PHP 7 Compatibility Checking Using php7cc (and PHPCompatibility)Automatic PHP 7 Compatibility Checking Using php7cc (and PHPCompatibility)
Automatic PHP 7 Compatibility Checking Using php7cc (and PHPCompatibility)Mark Niebergall
 
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Wim Godden
 
Debugging PHP with Xdebug - PHPUK 2018
Debugging PHP with Xdebug - PHPUK 2018Debugging PHP with Xdebug - PHPUK 2018
Debugging PHP with Xdebug - PHPUK 2018Mark Niebergall
 
Yapc::NA::2009 - Command Line Perl
Yapc::NA::2009 - Command Line PerlYapc::NA::2009 - Command Line Perl
Yapc::NA::2009 - Command Line PerlBruce Gray
 
Getting started with Perl XS and Inline::C
Getting started with Perl XS and Inline::CGetting started with Perl XS and Inline::C
Getting started with Perl XS and Inline::Cdaoswald
 
EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4Max Kleiner
 

What's hot (20)

In Vogue Dynamic
In Vogue DynamicIn Vogue Dynamic
In Vogue Dynamic
 
CLI, the other SAPI
CLI, the other SAPICLI, the other SAPI
CLI, the other SAPI
 
typemap in Perl/XS
typemap in Perl/XS  typemap in Perl/XS
typemap in Perl/XS
 
What you need to remember when you upload to CPAN
What you need to remember when you upload to CPANWhat you need to remember when you upload to CPAN
What you need to remember when you upload to CPAN
 
Zend Framework 2 Components
Zend Framework 2 ComponentsZend Framework 2 Components
Zend Framework 2 Components
 
Metamodeling of custom Pharo images
 Metamodeling of custom Pharo images Metamodeling of custom Pharo images
Metamodeling of custom Pharo images
 
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
 
Laravel 4 package development
Laravel 4 package developmentLaravel 4 package development
Laravel 4 package development
 
Hyperledger 구조 분석
Hyperledger 구조 분석Hyperledger 구조 분석
Hyperledger 구조 분석
 
Java SE 8 library design
Java SE 8 library designJava SE 8 library design
Java SE 8 library design
 
YAPC::NA 2007 - An Introduction To Perl Critic
YAPC::NA 2007 - An Introduction To Perl CriticYAPC::NA 2007 - An Introduction To Perl Critic
YAPC::NA 2007 - An Introduction To Perl Critic
 
C tutorial
C tutorialC tutorial
C tutorial
 
Effective Go
Effective GoEffective Go
Effective Go
 
Automatic PHP 7 Compatibility Checking Using php7cc (and PHPCompatibility)
Automatic PHP 7 Compatibility Checking Using php7cc (and PHPCompatibility)Automatic PHP 7 Compatibility Checking Using php7cc (and PHPCompatibility)
Automatic PHP 7 Compatibility Checking Using php7cc (and PHPCompatibility)
 
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011
 
Debugging PHP with Xdebug - PHPUK 2018
Debugging PHP with Xdebug - PHPUK 2018Debugging PHP with Xdebug - PHPUK 2018
Debugging PHP with Xdebug - PHPUK 2018
 
Yapc::NA::2009 - Command Line Perl
Yapc::NA::2009 - Command Line PerlYapc::NA::2009 - Command Line Perl
Yapc::NA::2009 - Command Line Perl
 
Getting started with Perl XS and Inline::C
Getting started with Perl XS and Inline::CGetting started with Perl XS and Inline::C
Getting started with Perl XS and Inline::C
 
Boosting Developer Productivity with Clang
Boosting Developer Productivity with ClangBoosting Developer Productivity with Clang
Boosting Developer Productivity with Clang
 
EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4EKON 25 Python4Delphi_mX4
EKON 25 Python4Delphi_mX4
 

Similar to Php 5.6 vs Php 7 performance comparison

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 ?Wim Godden
 
Last Month in PHP - February 2017
Last Month in PHP - February 2017Last Month in PHP - February 2017
Last Month in PHP - February 2017Eric Poe
 
Php5 vs php7
Php5 vs php7Php5 vs php7
Php5 vs php7gentlex2
 
20 cool features that is in PHP 7, we missed in PHP 5. Let walkthrough with t...
20 cool features that is in PHP 7, we missed in PHP 5. Let walkthrough with t...20 cool features that is in PHP 7, we missed in PHP 5. Let walkthrough with t...
20 cool features that is in PHP 7, we missed in PHP 5. Let walkthrough with t...DrupalMumbai
 
Last train to php 7
Last train to php 7Last train to php 7
Last train to php 7Damien Seguy
 
PHP 8: What's New and Changed
PHP 8: What's New and ChangedPHP 8: What's New and Changed
PHP 8: What's New and ChangedAyesh Karunaratne
 
Php 7.2 compliance workshop php benelux
Php 7.2 compliance workshop php beneluxPhp 7.2 compliance workshop php benelux
Php 7.2 compliance workshop php beneluxDamien Seguy
 
Last Month in PHP - June 2016
Last Month in PHP - June 2016Last Month in PHP - June 2016
Last Month in PHP - June 2016Eric Poe
 
Php7 extensions workshop
Php7 extensions workshopPhp7 extensions workshop
Php7 extensions workshopjulien pauli
 
What To Expect From PHP7
What To Expect From PHP7What To Expect From PHP7
What To Expect From PHP7Codemotion
 
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 - HuyenNTFramgia Vietnam
 
The why and how of moving to php 7.x
The why and how of moving to php 7.xThe why and how of moving to php 7.x
The why and how of moving to php 7.xWim Godden
 
The why and how of moving to php 7.x
The why and how of moving to php 7.xThe why and how of moving to php 7.x
The why and how of moving to php 7.xWim Godden
 
A brief to PHP 7.3
A brief to PHP 7.3A brief to PHP 7.3
A brief to PHP 7.3Xinchen Hui
 
PHP 7 Crash Course
PHP 7 Crash CoursePHP 7 Crash Course
PHP 7 Crash CourseColin O'Dell
 

Similar to Php 5.6 vs Php 7 performance comparison (20)

Php 7 - YNS
Php 7 - YNSPhp 7 - YNS
Php 7 - YNS
 
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 ?
 
Php7
Php7Php7
Php7
 
Last Month in PHP - February 2017
Last Month in PHP - February 2017Last Month in PHP - February 2017
Last Month in PHP - February 2017
 
Php5 vs php7
Php5 vs php7Php5 vs php7
Php5 vs php7
 
20 cool features that is in PHP 7, we missed in PHP 5. Let walkthrough with t...
20 cool features that is in PHP 7, we missed in PHP 5. Let walkthrough with t...20 cool features that is in PHP 7, we missed in PHP 5. Let walkthrough with t...
20 cool features that is in PHP 7, we missed in PHP 5. Let walkthrough with t...
 
Last train to php 7
Last train to php 7Last train to php 7
Last train to php 7
 
PHP 8: What's New and Changed
PHP 8: What's New and ChangedPHP 8: What's New and Changed
PHP 8: What's New and Changed
 
Guidelines php 8 gig
Guidelines php 8 gigGuidelines php 8 gig
Guidelines php 8 gig
 
Start using PHP 7
Start using PHP 7Start using PHP 7
Start using PHP 7
 
Php 7.2 compliance workshop php benelux
Php 7.2 compliance workshop php beneluxPhp 7.2 compliance workshop php benelux
Php 7.2 compliance workshop php benelux
 
Last Month in PHP - June 2016
Last Month in PHP - June 2016Last Month in PHP - June 2016
Last Month in PHP - June 2016
 
Learning php 7
Learning php 7Learning php 7
Learning php 7
 
Php7 extensions workshop
Php7 extensions workshopPhp7 extensions workshop
Php7 extensions workshop
 
What To Expect From PHP7
What To Expect From PHP7What To Expect From PHP7
What To Expect From PHP7
 
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
 
The why and how of moving to php 7.x
The why and how of moving to php 7.xThe why and how of moving to php 7.x
The why and how of moving to php 7.x
 
The why and how of moving to php 7.x
The why and how of moving to php 7.xThe why and how of moving to php 7.x
The why and how of moving to php 7.x
 
A brief to PHP 7.3
A brief to PHP 7.3A brief to PHP 7.3
A brief to PHP 7.3
 
PHP 7 Crash Course
PHP 7 Crash CoursePHP 7 Crash Course
PHP 7 Crash Course
 

More from Tu Pham

Go from idea to app with no coding using AppSheet.pptx
Go from idea to app with no coding using AppSheet.pptxGo from idea to app with no coding using AppSheet.pptx
Go from idea to app with no coding using AppSheet.pptxTu Pham
 
Secure your app against DDOS, API Abuse, Hijacking, and Fraud
 Secure your app against DDOS, API Abuse, Hijacking, and Fraud Secure your app against DDOS, API Abuse, Hijacking, and Fraud
Secure your app against DDOS, API Abuse, Hijacking, and FraudTu Pham
 
Challenges In Implementing SRE
Challenges In Implementing SREChallenges In Implementing SRE
Challenges In Implementing SRETu Pham
 
IT Strategy
IT Strategy IT Strategy
IT Strategy Tu Pham
 
Set up Learn and Development program
Set up Learn and Development programSet up Learn and Development program
Set up Learn and Development programTu Pham
 
Cost Management For IT Project / Product
Cost Management For IT Project / ProductCost Management For IT Project / Product
Cost Management For IT Project / ProductTu Pham
 
Minimum Viable Product 101
Minimum Viable Product 101Minimum Viable Product 101
Minimum Viable Product 101Tu Pham
 
Understand your customers
Understand your customersUnderstand your customers
Understand your customersTu Pham
 
Let's build great products for mid-size companies
Let's build great products for mid-size companiesLet's build great products for mid-size companies
Let's build great products for mid-size companiesTu Pham
 
Latency Control And Supervision In Resilience Design Patterns
Latency Control And Supervision In Resilience Design Patterns Latency Control And Supervision In Resilience Design Patterns
Latency Control And Supervision In Resilience Design Patterns Tu Pham
 
End To End Business Intelligence On Google Cloud
End To End Business Intelligence On Google CloudEnd To End Business Intelligence On Google Cloud
End To End Business Intelligence On Google CloudTu Pham
 
High Output Tech Management
High Output Tech Management High Output Tech Management
High Output Tech Management Tu Pham
 
Big Data Driven At Eway
Big Data Driven At Eway Big Data Driven At Eway
Big Data Driven At Eway Tu Pham
 
Security On The Cloud
Security On The CloudSecurity On The Cloud
Security On The CloudTu Pham
 
Eway Tech Talk #2 Coding Guidelines
Eway Tech Talk #2 Coding GuidelinesEway Tech Talk #2 Coding Guidelines
Eway Tech Talk #2 Coding GuidelinesTu Pham
 
End To End Machine Learning With Google Cloud
End To End Machine Learning With Google Cloud End To End Machine Learning With Google Cloud
End To End Machine Learning With Google Cloud Tu Pham
 
Eway Tech Talk #0 Knowledge Sharing
Eway Tech Talk #0 Knowledge SharingEway Tech Talk #0 Knowledge Sharing
Eway Tech Talk #0 Knowledge SharingTu Pham
 
System Security on Cloud
System Security on CloudSystem Security on Cloud
System Security on CloudTu Pham
 
Big Data at DYNO
Big Data at DYNOBig Data at DYNO
Big Data at DYNOTu Pham
 
Big data on google cloud
Big data on google cloudBig data on google cloud
Big data on google cloudTu Pham
 

More from Tu Pham (20)

Go from idea to app with no coding using AppSheet.pptx
Go from idea to app with no coding using AppSheet.pptxGo from idea to app with no coding using AppSheet.pptx
Go from idea to app with no coding using AppSheet.pptx
 
Secure your app against DDOS, API Abuse, Hijacking, and Fraud
 Secure your app against DDOS, API Abuse, Hijacking, and Fraud Secure your app against DDOS, API Abuse, Hijacking, and Fraud
Secure your app against DDOS, API Abuse, Hijacking, and Fraud
 
Challenges In Implementing SRE
Challenges In Implementing SREChallenges In Implementing SRE
Challenges In Implementing SRE
 
IT Strategy
IT Strategy IT Strategy
IT Strategy
 
Set up Learn and Development program
Set up Learn and Development programSet up Learn and Development program
Set up Learn and Development program
 
Cost Management For IT Project / Product
Cost Management For IT Project / ProductCost Management For IT Project / Product
Cost Management For IT Project / Product
 
Minimum Viable Product 101
Minimum Viable Product 101Minimum Viable Product 101
Minimum Viable Product 101
 
Understand your customers
Understand your customersUnderstand your customers
Understand your customers
 
Let's build great products for mid-size companies
Let's build great products for mid-size companiesLet's build great products for mid-size companies
Let's build great products for mid-size companies
 
Latency Control And Supervision In Resilience Design Patterns
Latency Control And Supervision In Resilience Design Patterns Latency Control And Supervision In Resilience Design Patterns
Latency Control And Supervision In Resilience Design Patterns
 
End To End Business Intelligence On Google Cloud
End To End Business Intelligence On Google CloudEnd To End Business Intelligence On Google Cloud
End To End Business Intelligence On Google Cloud
 
High Output Tech Management
High Output Tech Management High Output Tech Management
High Output Tech Management
 
Big Data Driven At Eway
Big Data Driven At Eway Big Data Driven At Eway
Big Data Driven At Eway
 
Security On The Cloud
Security On The CloudSecurity On The Cloud
Security On The Cloud
 
Eway Tech Talk #2 Coding Guidelines
Eway Tech Talk #2 Coding GuidelinesEway Tech Talk #2 Coding Guidelines
Eway Tech Talk #2 Coding Guidelines
 
End To End Machine Learning With Google Cloud
End To End Machine Learning With Google Cloud End To End Machine Learning With Google Cloud
End To End Machine Learning With Google Cloud
 
Eway Tech Talk #0 Knowledge Sharing
Eway Tech Talk #0 Knowledge SharingEway Tech Talk #0 Knowledge Sharing
Eway Tech Talk #0 Knowledge Sharing
 
System Security on Cloud
System Security on CloudSystem Security on Cloud
System Security on Cloud
 
Big Data at DYNO
Big Data at DYNOBig Data at DYNO
Big Data at DYNO
 
Big data on google cloud
Big data on google cloudBig data on google cloud
Big data on google cloud
 

Recently uploaded

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 

Recently uploaded (20)

"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Php 5.6 vs Php 7 performance comparison

  • 1. v PHP-7.X Vu Thanh Tai - 15/06/2018
  • 2. OVERVIEW • Performances • Changes & Enhancements • New Features • Deprecations
  • 3. • PHP 7.0.X • PHP 7.1.X • PHP 7.2.X
  • 5. Performances ● Machine used: 8x Intel(R) Xeon(R) CPU @ 2.20GHz (Powered by Google Cloud Platform and running in an isolated container) ● OS: Ubuntu 16.04.3 LTS ● Docker Stack: Debian 8, Nginx 1.13.8, MariaDB 10.1.31 ● PHP Engines: 5.6, 7.0, 7.1, 7.2 ● HHVM: 3.24.2 ● OPCache: For WordPress, Joomla, and Drupal, we used the official Docker image. For the rest we used the same image setup with the OPcache enabled using the following recommended php.ini settings.
  • 6. Performances ● WordPress 4.9.4 PHP 5.6 benchmark results: 49.18 req/sec ● WordPress 4.9.4 PHP 7.0 benchmark results: 133.55 req/sec ● WordPress 4.9.4 PHP 7.1 benchmark results: 134.24 req/sec ● WordPress 4.9.4 PHP 7.2 benchmark results: 148.80 req/sec 🏆 ● WordPress 4.9.4 HHVM benchmark results: 144.76 req/sec
  • 7. Performances ● WordPress 4.9.4 + WooCommerce 3.3.1 PHP 5.6 benchmark results: 34.47 req/sec ● WordPress 4.9.4 + WooCommerce 3.3.1 PHP 7.0 benchmark results: 84.89 req/sec ● WordPress 4.9.4 + WooCommerce 3.3.1 PHP 7.1 benchmark results: 86.04 req/sec ● WordPress 4.9.4 + WooCommerce 3.3.1 PHP 7.2 benchmark results: 92.60 req/sec 🏆 ● WordPress 4.9.4 + WooCommerce 3.3.1 HHVM benchmark results: 69.58 req/sec
  • 8. Performances ● Drupal 8.4.4 PHP 5.6 benchmark results: 7.05 req/sec ● Drupal 8.4.4 PHP 7.0 benchmark results: 15.94 req/sec ● Drupal 8.4.4 PHP 7.1 benchmark results: 19.15 req/sec ● Drupal 8.4.4 PHP 7.2 benchmark results: (not supported) ● Drupal 8.4.4 HHVM benchmark results: 19.57 req/sec 🏆
  • 9. Performances ● Joomla! 3.8.5 PHP 5.6 benchmark results: 26.42 req/sec ● Joomla! 3.8.5 PHP 7.0 benchmark results: 41.46 req/sec ● Joomla! 3.8.5 PHP 7.1 benchmark results: 41.17 req/sec ● Joomla! 3.8.5 PHP 7.2 benchmark results: 42.36 req/sec ● Joomla! 3.8.5 HHVM benchmark results: 51.84 req/sec 🏆
  • 10. Performances ● Magento 2 (CE) 2.1.11 PHP 5.6 benchmark results: 10.75 req/sec ● Magento 2 (CE) 2.1.11 PHP 7.0 benchmark results: 20.87 req/sec ● Magento 2 (CE) 2.1.11 PHP 7.1 benchmark results: 29.84 req/sec 🏆 ● Magento 2 (CE) 2.1.11 PHP 7.2 benchmark results: not supported ● Magento 2 (CE) 2.1.11 HHVM benchmark results: not supported
  • 11. Performances ● Laravel 5.4.36 PHP 5.6 benchmark results: 66.57 req/sec ● Laravel 5.4.36 PHP 7.0 benchmark results: 114.55 req/sec ● Laravel 5.4.36 PHP 7.1 benchmark results: 113.26 req/sec ● Laravel 5.4.36 PHP 7.2 benchmark results: 114.04 req/sec ● Laravel 5.4.36 HHVM benchmark results: 394.31 req/sec 🏆
  • 12. Performances ● Laravel 5.6 PHP 5.6 benchmark results: not supported ● Laravel 5.6 PHP 7.0 benchmark results: not supported ● Laravel 5.6 PHP 7.1 benchmark results: 411.39 req/sec ● Laravel 5.6 PHP 7.2 benchmark results: 442.17 req/sec 🏆 ● Laravel 5.6 HHVM benchmark results: not supported
  • 13. Performances ● Symfony 3.3.6 PHP 5.6 benchmark results: 81.78 req/sec ● Symfony 3.3.6 PHP 7.0 benchmark results: 184.15 req/sec ● Symfony 3.3.6 PHP 7.1 benchmark results: 187.60 req/sec ● Symfony 3.3.6 PHP 7.2 benchmark results: 196.94 req/sec 🏆 ● Symfony 3.3.6 HHVM benchmark results: not supported
  • 14. Performances ● Symfony 4.0.1 PHP 5.6 benchmark results: not supported ● Symfony 4.0.1 PHP 7.0 benchmark results: not supported ● Symfony 4.0.1 PHP 7.1 benchmark results: 188.12 req/sec ● Symfony 4.0.1 PHP 7.2 benchmark results: 197.17 req/sec 🏆 ● Symfony 4.0.1 HHVM benchmark results: not supported
  • 16. Changes & Enhancements PHP ● PHP 5: Parser Opcodes Execution PHP ● PHP 7: Parser Opcodes Execution AST
  • 18. New Features - PHP 7.0.X • PHP 7.0.X released 03/12/2015. • PHP 7.0.X comes with a new version of the Zend Engine.
  • 19. New Features - PHP 7.0.X
  • 20. New Features - PHP 7.0.X - Scalar type declarations: PHP 5.X PHP 7.0.X
  • 21. New Features - PHP 7.0.X - Scalar type declarations: Type Declaration int float string bool object int yes yes* yes^ yes no float yes yes yes^ yes no string yes^ yes yes yes yes~ bool yes yes yes yes no * Only non-NaN floats between PHP_INT_MIN and PHP_INT_MAX accepted. ^ If it’s a numeric string ~ Only if object has a toString() method
  • 22. New Features - PHP 7.0.X - Scalar type declarations: ● By default, PHP will coerce values of the wrong type into the expected scalar type if possible. For example, a function that is given an integer for a parameter that expects a string will get a variable of type string. Config strict types:
  • 23. New Features - PHP 7.0.X - Scalar type declarations: Example with strict mode:
  • 24. New Features - PHP 7.0.X - Return type declarations: ● PHP 7 adds support for return type declarations. Similarly to argument type declarations, return type declarations specify the type of the value that will be returned from a function. The same types are available for return type declarations as are available for argument type declarations.
  • 25. New Features - PHP 7.0.X - Null coalescing operator: ● The null coalescing operator (??) has been added as syntactic sugar for the common case of needing to use a ternary in conjunction with isset(). It returns its first operand if it exists and is not NULL; otherwise it returns its second operand.
  • 26. New Features - PHP 7.0.X - Spaceship operator: ● The spaceship operator is used for comparing two expressions. It returns -1, 0 or 1 when $a is respectively less than, equal to, or greater than $b. Comparisons are performed according to PHP's usual type comparison rules.
  • 27. New Features - PHP 7.0.X - Constant arrays using define(): ● Array constants can now be defined with define(). In PHP 5.6, they could only be defined with const.
  • 28. New Features - PHP 7.0.X - Anonymous classes: ● Support for anonymous classes has been added via new class. These can be used in place of full class definitions for throwaway objects:
  • 29. New Features - PHP 7.0.X - Closure::call(): ● Closure::call() is a more performant, shorthand way of temporarily binding an object scope to a closure and invoking it.
  • 30. New Features - PHP 7.0.X - Filtered unserialize(): ● This feature seeks to provide better security when unserializing objects on untrusted data. It prevents possible code injections by enabling the developer to whitelist classes that can be unserialized.
  • 31. New Features - PHP 7.0.X - Group use declarations: ● Classes, functions and constants being imported from the same namespace can now be grouped together in a single use statement.
  • 32. New Features - PHP 7.0.X - Other Features: ● Generator Return Expressions ● Integer division with intdiv() ● preg_replace_callback_array() ● IntlChar ● Unicode codepoint escape syntax
  • 34. Deprecated - PHP 7.0.X - PHP 4 style constructors: ● PHP 4 style constructors (methods that have the same name as the class they are defined in) are deprecated, and will be removed in the future. PHP 7 will emit E_DEPRECATED if a PHP4 constructor is the only constructor defined within a class. Classes that implement a __construct() method are unaffected.
  • 35. Deprecated - PHP 7.0.X - Static calls to non-static methods: ● Static calls to methods that are not declared static are deprecated, and may be removed in the future.
  • 36. Deprecated - PHP 7.0.X - password_hash() salt option: ● The salt option for the password_hash() function has been deprecated to prevent developers from generating their own (usually insecure) salts. The function itself generates a cryptographically secure salt when no salt is provided by the developer - therefore custom salt generation should not be needed.
  • 37. Deprecated - PHP 7.0.X - Other Deprecated: ● capture_session_meta SSL context option. ● ldap_soft() function in library LDAP.
  • 39. New Features - PHP 7.1.X PHP 7.1.X released 01/12/2016.
  • 40. New Features - PHP 7.1.X Nullable types: ● Type declarations for parameters and return values can now be marked as nullable by prefixing the type name with a question mark. This signifies that as well as the specified type, NULL can be passed as an argument, or returned as a value, respectively.
  • 41. New Features - PHP 7.1.X - Void functions: ● Type declarations for parameters and return values can now be marked as nullable by prefixing the type name with a question mark. This signifies that as well as the specified type, NULL can be passed as an argument, or returned as a value, respectively.
  • 42. New Features - PHP 7.1.X - Class constant visibility: ● Support for specifying the visibility of class constants has been added.
  • 43. New Features - PHP 7.1.X - Multi catch exception handling: ● Multiple exceptions per catch block may now be specified using the pipe character (|). This is useful for when different exceptions from different class hierarchies are handled the same.
  • 44. New Features - PHP 7.1.X - Support for keys in list(): ● You can now specify keys in list(), or its new shorthand [] syntax. This enables destructuring of arrays with non-integer or non-sequential keys.
  • 45. New Features - PHP 7.1.X - Support for negative string offsets: ● Support for negative string offsets has been added to the string manipulation functions accepting offsets, as well as to string indexing with [] or {}. In such cases, a negative offset is interpreted as being an offset from the end of the string.
  • 46. Deprecated - PHP 7.1.X - Other Deprecated: ● iterable pseudo-type. ● Support for AEAD in ext/openssl. ● Convert callables to Closures with Closure::fromCallable()
  • 48. Deprecated - PHP 7.1.X - ● Eval option for mb_ereg_replace() and mb_eregi_replace() ● ext/mcrypt
  • 50. New Features - PHP 7.2.X PHP 7.2.X released 30/11/2017.
  • 51. New Features - PHP 7.2.X - New object type: ● A new type, object, has been introduced that can be used for (contravariant) parameter typing and (covariant) return typing of any objects.
  • 52. New Features - PHP 7.2.X - Abstract method overriding: ● Abstract methods can now be overridden when an abstract class extends another abstract class.
  • 53. New Features - PHP 7.2.X - Parameter type widening: ● Parameter types from overridden methods and from interface implementations may now be omitted. This is still in compliance with LSP, since parameters types are contravariant.
  • 54. New Features - PHP 7.2.X - Password hashing with Argon2: ● Argon2 has been added to the password hashing API, where the following constants have been exposed: ○ PASSWORD_ARGON2I ○ PASSWORD_ARGON2_DEFAULT_MEMORY_COST ○ PASSWORD_ARGON2_DEFAULT_TIME_COST ○ PASSWORD_ARGON2_DEFAULT_THREADS
  • 55. New Features - PHP 7.2.X - Other New Features: ● SQLite3 allows writing BLOBs. ● Oracle OCI8 Transparent Application Failover Callbacks. ● Enhancements to the ZIP extension. ● proc_nice() support on Windows.
  • 57. Deprecates - PHP 7.2.X - __autoload() method: ● The __autoload() method has been deprecated because it is inferior to spl_autoload_register() (due to it not being able to chain autoloaders), and there is no interoperability between the two autoloading styles.
  • 58. Deprecates - PHP 7.2.X - ● create_function(). ● parse_str() without a second argument. ● gmp_random() function. ● each() function. ● assert() with a string argument. ● ...
  • 59. Deprecates - PHP 7.2.X - __autoload() method: ● The __autoload() method has been deprecated because it is inferior to spl_autoload_register() (due to it not being able to chain autoloaders), and there is no interoperability between the two autoloading styles.