php 7 - above and beyond

33
PHP 7 Above and beyond

Upload: rafaelfqf

Post on 14-Jan-2017

429 views

Category:

Technology


0 download

TRANSCRIPT

PHP 7Above and beyond

100%+Performance gain on most real-world applications

What is coming in PHP 7 that may break your existing code

What is coming in PHP 7 that will impact how you write PHP

Get PHP7 up and running

3v4lhttps://3v4l.org

Backward Compatibility Breaking RFCsContinue output buffering despite aborted connection

Replacing current json extension with jsond

Make defining multiple default cases in a switch a syntax error

Remove alternative PHP tags

Abstract syntax tree

Reclassify E_STRICT notices

Reserve More Types in PHP7

Uniform Variable Syntax

ZPP Failure on Overflow

Constructor behavior of internal classes

Fix "foreach" behavior

Removal of dead or not yet PHP7 ported SAPIs and extensions

Remove PHP 4 Constructors

Fix handling of custom session handler return values

Backward Compatibility BreakingContinue output buffering despite aborted connection

Replacing current json extension with jsond

Make defining multiple default cases in a switch a syntax error

Remove alternative PHP tags

Abstract syntax tree

Reclassify E_STRICT notices

Reserve More Types in PHP7

Uniform Variable Syntax

ZPP Failure on Overflow

Constructor behavior of internal classes

Fix "foreach" behavior

Removal of dead or not yet PHP7 ported SAPIs and extensions

Remove PHP 4 Constructors

Fix handling of custom session handler return values

Make defining multiple default cases in a switch a syntax error

https://3v4l.org/PYHog

Remove alternative PHP tags<% opening tag

<%= opening tag with echo

%> closing tag

(<script\s+language\s*=\s*(php|"php"|'php')\s*>)i opening tag

(</script>)i closing tag

Remove alternative PHP tags

<?= is not being removed

Reserve More Types in PHP 7intfloatboolstringtrue, falsenullresourceobjectmixednumeric

If your code uses any of these new reserved words as variable names or class names, change them now.

Removal of dead or not yet PHP7 ported SAPIs and extensionsaolserverapacheapache_hookscaudiumcontinuityisapimilterphttpdpi3webroxenthttpdtuxwebjames

apache2filternsapimysqleregimapmcryptinterbasemssqloci8pdo_dblibpdo_ocisybase_ct

Removal of dead or not yet PHP7 ported SAPIs and extensionsaolserverapacheapache_hookscaudiumcontinuityisapimilterphttpdpi3webroxenthttpdtuxwebjames

apache2filternsapimysqleregimapmcryptinterbasemssqloci8pdo_dblibpdo_ocisybase_ct

High Impact RFCsSpaceship Operator

Anonymous Classes

Bind Closure on Call

Generator Return Expressions

Generator Delegation

Filtered unserialized()

Exceptions in the Engine

Easy User-Land CSPRNG

Null Coalesce Operator

Return Type Declarations

Scalar Type Declarations

Group Use Declarations

High ImpactSpaceship Operator

Anonymous Classes

Bind Closure on Call

Generator Return Expressions

Generator Delegation

Filtered unserialized()

Exceptions in the Engine

Easy User-Land CSPRNG

Null Coalesce Operator

Return Type Declarations

Scalar Type Declarations

Group Use Declarations

Combined Comparison (Spaceship) OperatorPHP’s first trinary operator

https://3v4l.org/RMPDK

https://3v4l.org/Y4isF

Combined Comparison (Spaceship) Operator

Null Coalesce Operatorhttps://3v4l.org/OldcW

Return Type Declarations

https://3v4l.org/VEPNr

__construct() cannot declare a return type

__destruct() cannot declare a return type

__clone() cannot declare a return type

Return Type DeclarationsWhen a sub-type overrides a parent method then the return type of the child must exactly match the parent and may not be omitted.

If a mismatch is detected during compile time then E_COMPILE_ERROR will be issued.

If a type mismatch is detected when the function returns then E_RECOVERABLE_ERROR will be issued.

https://3v4l.org/D5AlG

Return Type Declarationshttps://3v4l.org/ip7fA

Group Use Declarations

Group Use Declarations