SlideShare a Scribd company logo
Better & faster
Bruno Ricardo Siqueira
2015
ABOUT THE SPEAKER
Bruno Ricardo Siqueira.
Web developer and PHP evangelist
in Brazil. Docker enthusiast. Git
heavy user.
Working with Web Development
for the last 8 years, Bachelor in
Information Systems by University
of Sao Paulo ICMC - USP, currently
working at CI&T as Software
Engineer.
AGENDA
● Warming-up
○ Contextualization
○ Deprecations
○ Removals &
inconsistency reduction
● Looking inside
○ Memory
○ Performance
● New features
○ Unicode
○ Exception in the core
○ Anonymous classes
○ Operators
○ Declarations
○ Generators
● Near future & conclusions
● Questions
WARMING-UP
WARMING-UP - CONTEXTUALIZATION
● 2009 - PHP 5.3
○ Namespaces
○ Anonymous functions
● 2009 - PHP-FIG
● 2010 - HipHop for PHP
(HPHPc)
○ PHP -> C++ binary
● 2011 - HipHop Virtual Machine
(HHVM)
○ JIT -> HipHop ByteCode
● 2012 - PHP 5.4
○ Traits
○ Built in Webserver
● 2013 - PHP 5.5
○ Generators
○ OpCache in the core
● 2014 - HACK Language
● 2014 - PHP 5.6
○ Variadic Functions (...)
○ reusable php://input
TDC SP 2015 - PHP7: better & faster
WARMING-UP - CONTEXTUALIZATION
WARMING-UP - CONTEXTUALIZATION
WARMING-UP - CONTEXTUALIZATION
WARMING-UP - CONTEXTUALIZATION
PHP7 BETA2
24/07
● PHP 4 constructors
● password_hash() option
WARMING-UP - DEPRECATIONS
WARMING-UP - REMOVALS & INCONSISTENCY REDUCTION
● date.timezone warning:
○ default value
● alternative tags:
○ <% opening tag
○ <%= opening tag with echo
○ %> closing tag
○ (<scripts+languages*=s*(php|"php"|'php')s*>)i
opening tag
○ (</script>)i closing tag
● multiple default blocks in switch constructions
WARMING-UP - REMOVALS & INCONSISTENCY REDUCTION
● SAPIs & extensions:
○ sapi/aolserver, sapi/apache, sapi/apache_hooks,
sapi/apache2filter, sapi/caudium, sapi/continuity,
sapi/isapi, sapi/milter, sapi/nsapi, sapi/phttpd,
sapi/pi3web, sapi/roxen, sapi/thttpd, sapi/tux,
sapi/webjames, ext/mssql, ext/mysql,
ext/sybase_ct, ext/ereg
○ moved to PECL
● hexadecimals in numeric strings
● E_STRICT Notices
WARMING-UP - REMOVALS & INCONSISTENCY REDUCTION
● Uniform Variable Syntax
LOOKING INSIDE
TDC SP 2015 - PHP7: better & faster
LOOKING INSIDE - MEMORY
LOOKING INSIDE - PERFORMANCE
● ZVALs PHP 5.X
○ (almost) always heap
allocated
○ reference counted &
cycle colletcion
○ duplicated refcount
(objects)
○ too much referencing, e.
g.: 1 object in 1 variable ->
4 pointers
● ZVALs PHP 7
○ simple values (int, bool…)
without head allocation &
without refcount
○ no more double refcount.
○ reusable values
independent of zval
structure
Smaller data structures.
Less allocations.
Less referencing.
BETTER PERFORMANCE!
LOOKING INSIDE - PERFORMANCE
TDC SP 2015 - PHP7: better & faster
TDC SP 2015 - PHP7: better & faster
100% of
performance
improvement
in real
world
applications
NEW FEATURES
NEW FEATURES - UNICODE
NEW FEATURES - EXCEPTIONS IN THE CORE
NEW FEATURES - EXCEPTIONS IN THE CORE
NEW FEATURES - EXCEPTIONS IN THE CORE
NEW FEATURES - EXCEPTIONS IN THE CORE
NEW FEATURES - EXCEPTIONS IN THE CORE
NEW FEATURES - ANONYMOUS CLASSES
NEW FEATURES - OPERATORS spaceship operator <=>
NEW FEATURES - OPERATORS spaceship operator <=>
NEW FEATURES - OPERATORS spaceship operator <=>
NEW FEATURES - OPERATORS spaceship operator <=>
NEW FEATURES - OPERATORS spaceship operator <=>
NEW FEATURES - OPERATORS spaceship operator <=>
NEW FEATURES - OPERATORS spaceship operator <=>
NEW FEATURES - OPERATORS null coalesce operator ??
NEW FEATURES - OPERATORS null coalesce operator ??
NEW FEATURES - OPERATORS null coalesce operator ??
NEW FEATURES - OPERATORS null coalesce operator ??
NEW FEATURES - DECLARATIONS scalar types
NEW FEATURES - DECLARATIONS scalar types
NEW FEATURES - DECLARATIONS return types
NEW FEATURES - DECLARATIONS return types
NEW FEATURES - DECLARATIONS return types
NEW FEATURES - DECLARATIONS return types
NEW FEATURES - DECLARATIONS return types
NEW FEATURES - DECLARATIONS return types
NEW FEATURES - DECLARATIONS return types
NEW FEATURES - DECLARATIONS return types
NEW FEATURES - DECLARATIONS return types
NEW FEATURES - DECLARATIONS return types
NEW FEATURES - DECLARATIONS group use
NEW FEATURES - DECLARATIONS group use
NEW FEATURES - DECLARATIONS group use
NEW FEATURES - DECLARATIONS group use
NEW FEATURES - DECLARATIONS group use
NEW FEATURES - DECLARATIONS group use
NEW FEATURES - GENERATORS return expressions
NEW FEATURES - GENERATORS return expressions
NEW FEATURES - GENERATORS return expressions
NEW FEATURES - GENERATORS return expressions
NEW FEATURES - GENERATORS return expressions
NEW FEATURES - GENERATORS return expressions
NEW FEATURES - GENERATORS return expressions
NEW FEATURES - GENERATORS delegating generator
NEW FEATURES - GENERATORS delegating generator
NEW FEATURES - GENERATORS delegating generator
NEW FEATURES - GENERATORS delegating generator
NEW FEATURES - GENERATORS delegating generator
NEW FEATURES - GENERATORS delegating generator
NEW FEATURES - GENERATORS delegating generator
NEW FEATURES - GENERATORS delegating generator
return expressions + delegating generator…
Can you see the concurrency?
Lightweight
Threads
FTW!
NEAR FUTURE
& CONCLUSIONS
FUTURO PRÓXIMO
FUTURO PRÓXIMO
● PSR7 + Middleware pattern will
boost even more the PHP
packages reusability
● JIT + PHP Virtual Machine
● Language specification
● Better consistency
● AST will bring new/better
static analysis tools
● ...
TDC SP 2015 - PHP7: better & faster
QUESTIONS?
THANKS
FOR
BEING
HERE!
PHP7: better & faster
References: http://bit.ly/tdcsp-2015-php7
BRUNO RICARDO SIQUEIRA
@brunoric
https://joind.in/14853

More Related Content

PDF
[Question Paper] ASP.NET With C# (75:25 Pattern) [April / 2015]
PPT
PPTX
Npm node.js的套件管理程式
PDF
High Performance Solution for PHP7
PDF
NPM THE GUIDE
PPTX
Hacking Your Way to Better Security - ZendCon 2016
PPTX
Web crawlers with reinforcement learning
PDF
Secure PHP Coding
[Question Paper] ASP.NET With C# (75:25 Pattern) [April / 2015]
Npm node.js的套件管理程式
High Performance Solution for PHP7
NPM THE GUIDE
Hacking Your Way to Better Security - ZendCon 2016
Web crawlers with reinforcement learning
Secure PHP Coding

Viewers also liked (20)

PDF
PHP 7 - Above and Beyond
PDF
Introduction to NPM and building CLI Tools with Node.js
PPTX
Php vs asp
PDF
A History of PHP
PDF
PHP7 - The New Engine for old good train
PDF
PHP7 - For Its Best Performance
PDF
Application Security: Last Line of Defense
PDF
The secret of PHP7's Performance
PPTX
Hacking Your Way to Better Security - PHP South Africa 2016
PDF
Secure Software Development Adoption Strategy
PDF
Secure Code Review 101
PDF
Simple Photo Processing and Web Display with Perl
PDF
PHP7.1 New Features & Performance
PPTX
Automating Your Workflow with Gulp.js - php[world] 2016
PDF
Npm 套件管理 & 常用開發工具介紹
PPTX
Rise of the Machines: PHP and IoT - php[world] 2016
PPTX
Debugging Effectively - PHP UK 2017
PPTX
PHP 7 Crash Course - php[world] 2015
PDF
Node.js從無到有 基本課程
PDF
Interpret this... (PHPem 2016)
PHP 7 - Above and Beyond
Introduction to NPM and building CLI Tools with Node.js
Php vs asp
A History of PHP
PHP7 - The New Engine for old good train
PHP7 - For Its Best Performance
Application Security: Last Line of Defense
The secret of PHP7's Performance
Hacking Your Way to Better Security - PHP South Africa 2016
Secure Software Development Adoption Strategy
Secure Code Review 101
Simple Photo Processing and Web Display with Perl
PHP7.1 New Features & Performance
Automating Your Workflow with Gulp.js - php[world] 2016
Npm 套件管理 & 常用開發工具介紹
Rise of the Machines: PHP and IoT - php[world] 2016
Debugging Effectively - PHP UK 2017
PHP 7 Crash Course - php[world] 2015
Node.js從無到有 基本課程
Interpret this... (PHPem 2016)
Ad

Similar to TDC SP 2015 - PHP7: better & faster (20)

PDF
Trunk based development
PDF
Effects, Coeffects & Subscriptions: a pit of success for SPAs
PDF
Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18
PPTX
Designing Scalable Fintechs Scalac Webinar
PPTX
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
PDF
GraphQL Munich Meetup #1 - How We Use GraphQL At Commercetools
PPTX
GeeCon.cz - Integration Testing from the Trenches Rebooted
PDF
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
PDF
Introduction to PHP (SDPHP)
PDF
Sprint 44 review
PPTX
Introducing Performance Awareness in an Integrated Specification Environment
PDF
Fighting legacy with hexagonal architecture and frameworkless php
PDF
Debarrassez-vous de la dette technique dans votre organisation avec OrgCheck
PDF
Data Science in the Cloud @StitchFix
PDF
Drools & jBPM Workshop Barcelona 2013
PPTX
Performance in Geode: How Fast Is It, How Is It Measured, and How Can It Be I...
PDF
PPT. Introduction & Views - Documentation.pdf
PDF
Long-Term Outcomes: Customer-Centered Product Strategy For Machine Intelligen...
PDF
Drupal Café October - DrupalCon Highlights
PDF
Devops with Python by Yaniv Cohen DevopShift
Trunk based development
Effects, Coeffects & Subscriptions: a pit of success for SPAs
Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18
Designing Scalable Fintechs Scalac Webinar
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
GraphQL Munich Meetup #1 - How We Use GraphQL At Commercetools
GeeCon.cz - Integration Testing from the Trenches Rebooted
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
Introduction to PHP (SDPHP)
Sprint 44 review
Introducing Performance Awareness in an Integrated Specification Environment
Fighting legacy with hexagonal architecture and frameworkless php
Debarrassez-vous de la dette technique dans votre organisation avec OrgCheck
Data Science in the Cloud @StitchFix
Drools & jBPM Workshop Barcelona 2013
Performance in Geode: How Fast Is It, How Is It Measured, and How Can It Be I...
PPT. Introduction & Views - Documentation.pdf
Long-Term Outcomes: Customer-Centered Product Strategy For Machine Intelligen...
Drupal Café October - DrupalCon Highlights
Devops with Python by Yaniv Cohen DevopShift
Ad

More from Bruno Ricardo Siqueira (6)

PDF
Managing e commerce systems codebase with git
PDF
Construindo aplicações CLI com Symfony Console
PDF
TDC SP 2015 - PHP7: melhor e mais rápido
PPTX
Fluxo de desenvolvimento de software utilizando Git
PDF
Impulsionando sua presença Online
PDF
Desenvolvendo e implantando aplicações PHP utilizando Docker
Managing e commerce systems codebase with git
Construindo aplicações CLI com Symfony Console
TDC SP 2015 - PHP7: melhor e mais rápido
Fluxo de desenvolvimento de software utilizando Git
Impulsionando sua presença Online
Desenvolvendo e implantando aplicações PHP utilizando Docker

Recently uploaded (20)

PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPT
Introduction Database Management System for Course Database
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
ai tools demonstartion for schools and inter college
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
top salesforce developer skills in 2025.pdf
PDF
medical staffing services at VALiNTRY
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Understanding Forklifts - TECH EHS Solution
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Wondershare Filmora 15 Crack With Activation Key [2025
L1 - Introduction to python Backend.pptx
Computer Software and OS of computer science of grade 11.pptx
Reimagine Home Health with the Power of Agentic AI​
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Design an Analysis of Algorithms I-SECS-1021-03
Introduction Database Management System for Course Database
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
wealthsignaloriginal-com-DS-text-... (1).pdf
CHAPTER 2 - PM Management and IT Context
ai tools demonstartion for schools and inter college
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
top salesforce developer skills in 2025.pdf
medical staffing services at VALiNTRY
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Understanding Forklifts - TECH EHS Solution

TDC SP 2015 - PHP7: better & faster