SlideShare ist ein Scribd-Unternehmen logo
1 von 24
php5 vs php7
Major differences between two versions
The name of
“php7”Why php7 not php6 ?
The current stable release uses the version
number PHP 5.6. After some dispute the
development team decided they would omit the
PHP 6 name for the next major release. PHP 6
already existed in the past as an experimental
project but never reached the production phase.
To prevent users from mixing up the former
attempt with the latest development, the new
major release will run under the name of PHP 7.
PHP#NGThe Zend engine has been powering PHP
since 1999 when it was introduced with
the new PHP 4 release. Zend – not to
confused with the Zend Framework – is an
open-source execution engine written in C
that interprets the PHP language. The
current PHP 5.X series use Zend Engine II
that enhanced the functionality of the
initial engine and adds an extensible
object model and a significant
performance enhancement to the language.
PHP 7 receives a brand new version of the
engine coming under the code name of
PHP#NG (Next Generation)
Twice The SpeedThe most easily recognizable advantage of
the new PHPNG engine is the significant
performance improvement. The development
team of PHPNG refactored the Zend Engine,
and remarkably optimized memory usage.
The results? You can see the performance
benchmarks provided by the Zend
Performance Team below. By using PHP 7
not only your code will be executed
faster but you will also need fewer
servers to serve the same amount of
users.
Twice The Speed
https://www.zend.com/en/resources/php7_infographic
Twice The Speed
https://www.zend.com/en/resources/php7_infographic
Facilitates Error
Handling
To say the least, handling fatal and catchable
fatal errors have never been an easy task for
PHP coders. The new Engine Exceptions will allow
you to replace these kind of errors with
exceptions. If the exception is not caught, PHP
will continue to return the same fatal errors as
it does in the current 5.X series.
The new EngineException objects don’t extend
the Exception Base Class. This ensures backward
compatibility and results in two different kinds
of exceptions in error handling: traditional and
engine exceptions.
To enable programmers to catch both, PHP 7
introduces a new shared Parent Class under the
name of BaseException.
Facilitates Error
Handling
Supports x64
systems
PHP is a prominent member of the LAMP stack
which means its native environment is Linux
– but it’s also possible to run it on a
Windows system. The 5.X series don’t yet
provide 64-bit integer or large file
support, so until now x64 builds have been
considered experimental.
PHP 7 will change this as it introduces
consistent 64-bit support which means both
native 64-bit integers and large files will
be supported, allowing you to confidently
run the language on your 64-bit Windows
system in the future.
New Spaceship and
Null Coalescing
Operators
The Spaceship operator runs under the
official name of Combined Comparison
Operator. The notation of the new operator
looks like this: <=> (kind of like a
simplified spaceship, if you imagine it
right).
The spaceship operator returns 0 if both
operands are equal, 1 if the left is
greater, and -1 if the right is greater.
It’s also called a three-way comparison
operator, and it already exists in other
popular programming languages like Perl and
Ruby.
New Spaceship and
Null Coalescing
Operators
The Null
operator(??)
The Null Coalescing operator is denoted
with two question marks ( ?? ). You can
use it when you want to check if
something exists and return a default
value, in case it doesn’t. The coalesce
operator returns the result of its first
operand if it exists and is not null, and
the second operand in any other cases.
Here’s how the new operator reduces the
time spent with basic declarations:
The Null
operator(??)
Accurate return type
Have you ever wanted to prevent
unintended return values by declaring
the return type of a function? Well,
the new PHP 7 enables developers to
enhance the quality of their code
with the help of return type
declarations.
The image below depicts a very simple
use case where the foo() function is
supposed to return an array.
Accurate return type
Accurate return type
To enhance the feature even more, PHP
7 introduces 4 new type declarations
for scalar types: int, float, string
and bool. The new scalar types allow
developers to denote that they are
expecting integers, floats, strings,
or booleans to be returned. The new
scalar types introduced by PHP 7 will
also be supported by argument Type
Hints that enables developers to
force the type of parameters since
the PHP 5.X series.
Anonymous Classes
PHP 7 enables you to use anonymous classes,
already a well-established practice in
other object-oriented languages like C# and
Java. An anonymous class is a class without
a name. The object it instantiates has the
same functionality as an object of a named
class.
The syntax is the same as what we are used
to in traditional PHP classes, only the
name is missing. If anonymous classes are
used well, they can speed up coding as well
execution time. Anonymous classes are
excellent when a class is used only once
during execution and in cases when a class
doesn’t need to be documented.
Anonymous Classes
Facilitates Imports
From the Same
Namespace
The new Group Use Declarations
feature will be godsent to those of
who want to import many classes from
the same namespace. The new syntax
cuts verbosity, makes your code
tidier and easier on the eyes, and
saves you a lot of typing time.
It will also be easier to read
through and debug codes, as group use
declarations help you identify the
imports that belong to the same
module.
Facilitates Imports
From the Same
Namespace
Facilitates Imports
From the Same
Namespace
The goal of PHP 7 was to free up the
space to enable improvement, so it was
necessary to get rid of many deprecated
functionalities, old and unsupported
Server APIs and extensions.
All the removed items have been
deprecated for a while in PHP 5 so most
likely you haven’t used them for a long
time. However please note if you have a
legacy app running on older PHP versions
the new PHP 7 can potentially break the
code.
Deprecated Functions
• dl on fpm-fcgi (since PHP 5.3) REMOVED
• set_magic_quotes_runtime and magic_quotes_runtime
(since PHP 5.4) REMOVED
• set_socket_blocking (since PHP 5.4; use
stream_set_blocking instead) REMOVED
• mcrypt_generic_end (since PHP 5.4; use
mcrypt_generic_deinit instead) REMOVED
• mcrypt_ecb, mcrypt_cbc, mcrypt_cfb and mcrypt_ofb
(since PHP 5.5, but documented as deprecated
earlier; use mcrypt_encrypt and mcrypt_decrypt
instead) REMOVED
• datefmt_set_timezone_id and
IntlDateFormatter::setTimeZoneID (since PHP 5.5; use
datefmt_set_timezone or
IntlDateFormatter::setTimeZone instead) REMOVED
Deprecated SAPIs
• aolserver
• apache
• apache_hooks
• caudium
• continuity
• isapi
• milter
• phttpd
• pi3web
• roxen
• thttpd
• tux
• webjames
• apache2filter -
not really dead,
but currently
broken
• nsapi
References
• https://www.quora.com/What-are-the-
major-difference-between-PHP-5-and-PHP-7
• http://php.net/manual/en/language.errors
.php7.php
• http://www.zend.com
• http://php.net

Weitere ähnliche Inhalte

Was ist angesagt?

Windows PowerShell - Billings .NET User Group - August 2009
Windows PowerShell - Billings .NET User Group - August 2009Windows PowerShell - Billings .NET User Group - August 2009
Windows PowerShell - Billings .NET User Group - August 2009
John Clayton
 
Source-to-Source Compiler
Source-to-Source CompilerSource-to-Source Compiler
Source-to-Source Compiler
Mintoo Jakhmola
 

Was ist angesagt? (20)

Copy verb in cobol
Copy verb in cobolCopy verb in cobol
Copy verb in cobol
 
Windows PowerShell - Billings .NET User Group - August 2009
Windows PowerShell - Billings .NET User Group - August 2009Windows PowerShell - Billings .NET User Group - August 2009
Windows PowerShell - Billings .NET User Group - August 2009
 
Acceptance testing in php with Codeception - Techmeetup Edinburgh
Acceptance testing in php with Codeception - Techmeetup EdinburghAcceptance testing in php with Codeception - Techmeetup Edinburgh
Acceptance testing in php with Codeception - Techmeetup Edinburgh
 
Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)Codeception: introduction to php testing (v2 - Aberdeen php)
Codeception: introduction to php testing (v2 - Aberdeen php)
 
Php
PhpPhp
Php
 
Challenges in Debugging Bootstraps of Reflective Kernels
Challenges in Debugging Bootstraps of Reflective KernelsChallenges in Debugging Bootstraps of Reflective Kernels
Challenges in Debugging Bootstraps of Reflective Kernels
 
Unmanged code InterOperability
Unmanged code InterOperabilityUnmanged code InterOperability
Unmanged code InterOperability
 
Beyond 49x Transformers: Don't be afraid of (the) Python!
Beyond 49x Transformers: Don't be afraid of (the) Python!Beyond 49x Transformers: Don't be afraid of (the) Python!
Beyond 49x Transformers: Don't be afraid of (the) Python!
 
Golang Channels use cases
Golang Channels use casesGolang Channels use cases
Golang Channels use cases
 
Preprocessor in C
Preprocessor in CPreprocessor in C
Preprocessor in C
 
Testing PHP with Codeception
Testing PHP with CodeceptionTesting PHP with Codeception
Testing PHP with Codeception
 
Tail Call Elimination in Open Smalltalk
Tail Call Elimination in Open SmalltalkTail Call Elimination in Open Smalltalk
Tail Call Elimination in Open Smalltalk
 
PVS-Studio Has Finally Got to Boost
PVS-Studio Has Finally Got to BoostPVS-Studio Has Finally Got to Boost
PVS-Studio Has Finally Got to Boost
 
pre processor directives in C
pre processor directives in Cpre processor directives in C
pre processor directives in C
 
Source-to-Source Compiler
Source-to-Source CompilerSource-to-Source Compiler
Source-to-Source Compiler
 
Preprocessor
PreprocessorPreprocessor
Preprocessor
 
C++
C++C++
C++
 
Pre processor directives in c
Pre processor directives in cPre processor directives in c
Pre processor directives in c
 
Ctutor ashu
Ctutor ashuCtutor ashu
Ctutor ashu
 
When to use python in FME
When to use python in FMEWhen to use python in FME
When to use python in FME
 

Ähnlich wie Php5 vs php7

chapter 5 Server-Side Scripting (PHP).pdf
chapter 5 Server-Side Scripting (PHP).pdfchapter 5 Server-Side Scripting (PHP).pdf
chapter 5 Server-Side Scripting (PHP).pdf
burasyacob012
 

Ähnlich wie Php5 vs php7 (20)

Guidelines php 8 gig
Guidelines php 8 gigGuidelines php 8 gig
Guidelines php 8 gig
 
Php5doc
Php5docPhp5doc
Php5doc
 
Php7
Php7Php7
Php7
 
All you need to know about latest php version 7.4
All you need to know about latest php version 7.4All you need to know about latest php version 7.4
All you need to know about latest php version 7.4
 
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
 
Php 7 - YNS
Php 7 - YNSPhp 7 - YNS
Php 7 - YNS
 
Php&amp;yii2
Php&amp;yii2Php&amp;yii2
Php&amp;yii2
 
Unit 1
Unit 1Unit 1
Unit 1
 
Report.docx
Report.docxReport.docx
Report.docx
 
Web_Development_Using_PHP.pdf
Web_Development_Using_PHP.pdfWeb_Development_Using_PHP.pdf
Web_Development_Using_PHP.pdf
 
php 7.4 for word press developers
php 7.4 for word press developersphp 7.4 for word press developers
php 7.4 for word press developers
 
The why and how of moving to php 7
The why and how of moving to php 7The why and how of moving to php 7
The why and how of moving 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
 
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...
 
How PHP works
How PHP works How PHP works
How PHP works
 
Wc13
Wc13Wc13
Wc13
 
chapter 5 Server-Side Scripting (PHP).pdf
chapter 5 Server-Side Scripting (PHP).pdfchapter 5 Server-Side Scripting (PHP).pdf
chapter 5 Server-Side Scripting (PHP).pdf
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
 

Kürzlich hochgeladen

原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
ayvbos
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
ayvbos
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
F
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
F
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
ydyuyu
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Monica Sydney
 

Kürzlich hochgeladen (20)

Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
一比一原版(Flinders毕业证书)弗林德斯大学毕业证原件一模一样
 
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
Tadepalligudem Escorts Service Girl ^ 9332606886, WhatsApp Anytime Tadepallig...
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 

Php5 vs php7

  • 1. php5 vs php7 Major differences between two versions
  • 2. The name of “php7”Why php7 not php6 ? The current stable release uses the version number PHP 5.6. After some dispute the development team decided they would omit the PHP 6 name for the next major release. PHP 6 already existed in the past as an experimental project but never reached the production phase. To prevent users from mixing up the former attempt with the latest development, the new major release will run under the name of PHP 7.
  • 3. PHP#NGThe Zend engine has been powering PHP since 1999 when it was introduced with the new PHP 4 release. Zend – not to confused with the Zend Framework – is an open-source execution engine written in C that interprets the PHP language. The current PHP 5.X series use Zend Engine II that enhanced the functionality of the initial engine and adds an extensible object model and a significant performance enhancement to the language. PHP 7 receives a brand new version of the engine coming under the code name of PHP#NG (Next Generation)
  • 4. Twice The SpeedThe most easily recognizable advantage of the new PHPNG engine is the significant performance improvement. The development team of PHPNG refactored the Zend Engine, and remarkably optimized memory usage. The results? You can see the performance benchmarks provided by the Zend Performance Team below. By using PHP 7 not only your code will be executed faster but you will also need fewer servers to serve the same amount of users.
  • 7. Facilitates Error Handling To say the least, handling fatal and catchable fatal errors have never been an easy task for PHP coders. The new Engine Exceptions will allow you to replace these kind of errors with exceptions. If the exception is not caught, PHP will continue to return the same fatal errors as it does in the current 5.X series. The new EngineException objects don’t extend the Exception Base Class. This ensures backward compatibility and results in two different kinds of exceptions in error handling: traditional and engine exceptions. To enable programmers to catch both, PHP 7 introduces a new shared Parent Class under the name of BaseException.
  • 9. Supports x64 systems PHP is a prominent member of the LAMP stack which means its native environment is Linux – but it’s also possible to run it on a Windows system. The 5.X series don’t yet provide 64-bit integer or large file support, so until now x64 builds have been considered experimental. PHP 7 will change this as it introduces consistent 64-bit support which means both native 64-bit integers and large files will be supported, allowing you to confidently run the language on your 64-bit Windows system in the future.
  • 10. New Spaceship and Null Coalescing Operators The Spaceship operator runs under the official name of Combined Comparison Operator. The notation of the new operator looks like this: <=> (kind of like a simplified spaceship, if you imagine it right). The spaceship operator returns 0 if both operands are equal, 1 if the left is greater, and -1 if the right is greater. It’s also called a three-way comparison operator, and it already exists in other popular programming languages like Perl and Ruby.
  • 11. New Spaceship and Null Coalescing Operators
  • 12. The Null operator(??) The Null Coalescing operator is denoted with two question marks ( ?? ). You can use it when you want to check if something exists and return a default value, in case it doesn’t. The coalesce operator returns the result of its first operand if it exists and is not null, and the second operand in any other cases. Here’s how the new operator reduces the time spent with basic declarations:
  • 14. Accurate return type Have you ever wanted to prevent unintended return values by declaring the return type of a function? Well, the new PHP 7 enables developers to enhance the quality of their code with the help of return type declarations. The image below depicts a very simple use case where the foo() function is supposed to return an array.
  • 16. Accurate return type To enhance the feature even more, PHP 7 introduces 4 new type declarations for scalar types: int, float, string and bool. The new scalar types allow developers to denote that they are expecting integers, floats, strings, or booleans to be returned. The new scalar types introduced by PHP 7 will also be supported by argument Type Hints that enables developers to force the type of parameters since the PHP 5.X series.
  • 17. Anonymous Classes PHP 7 enables you to use anonymous classes, already a well-established practice in other object-oriented languages like C# and Java. An anonymous class is a class without a name. The object it instantiates has the same functionality as an object of a named class. The syntax is the same as what we are used to in traditional PHP classes, only the name is missing. If anonymous classes are used well, they can speed up coding as well execution time. Anonymous classes are excellent when a class is used only once during execution and in cases when a class doesn’t need to be documented.
  • 19. Facilitates Imports From the Same Namespace The new Group Use Declarations feature will be godsent to those of who want to import many classes from the same namespace. The new syntax cuts verbosity, makes your code tidier and easier on the eyes, and saves you a lot of typing time. It will also be easier to read through and debug codes, as group use declarations help you identify the imports that belong to the same module.
  • 21. Facilitates Imports From the Same Namespace The goal of PHP 7 was to free up the space to enable improvement, so it was necessary to get rid of many deprecated functionalities, old and unsupported Server APIs and extensions. All the removed items have been deprecated for a while in PHP 5 so most likely you haven’t used them for a long time. However please note if you have a legacy app running on older PHP versions the new PHP 7 can potentially break the code.
  • 22. Deprecated Functions • dl on fpm-fcgi (since PHP 5.3) REMOVED • set_magic_quotes_runtime and magic_quotes_runtime (since PHP 5.4) REMOVED • set_socket_blocking (since PHP 5.4; use stream_set_blocking instead) REMOVED • mcrypt_generic_end (since PHP 5.4; use mcrypt_generic_deinit instead) REMOVED • mcrypt_ecb, mcrypt_cbc, mcrypt_cfb and mcrypt_ofb (since PHP 5.5, but documented as deprecated earlier; use mcrypt_encrypt and mcrypt_decrypt instead) REMOVED • datefmt_set_timezone_id and IntlDateFormatter::setTimeZoneID (since PHP 5.5; use datefmt_set_timezone or IntlDateFormatter::setTimeZone instead) REMOVED
  • 23. Deprecated SAPIs • aolserver • apache • apache_hooks • caudium • continuity • isapi • milter • phttpd • pi3web • roxen • thttpd • tux • webjames • apache2filter - not really dead, but currently broken • nsapi