SlideShare a Scribd company logo
PHP v5.3+ FEATURES
Michael Bui
(FB & TW: MichaelBui2812)
PHP v5.3
● “ereg” deprecated
● SPL always enabled
● Reflection always enabled
● Magic methods
○ __invoke()
○ __callStatic()
● Performance improved
PHP v5.3
● Namespace
○ PSR-0
○ Composer
○ For classes, functions and constants
● Import classes
○ “use” keyword
○ relative & absolute namespaces
● Closures
PHP v5.4
● PHP_BINARY constant
● Array to string conversions will trigger
a notice
● Array callbacks:
○ [$obj, ‘method’]
○ [‘ClassName’, ‘method’]
● Memory & performance improved
PHP v5.4
● Traits
○ “compiler level” copy-n-paste (literally)
○ “insteadof” & “as” to solve collisions
● Closures
○ Support “$this”
○ Re-bind “$this”
● Short echo tags “<?=...?>” always work
● Binary numbers (0b...)
PHP v5.4 (Cont.)
● Short array syntax:
○ [‘a’=>1,’b’=>2] === array(‘a’=>1,’b’=>2)
○ Array dereferencing: getArray()[0];
● Initiation time access
○ (new Classname())->method()
● Dynamic method calls:
○ ClassName::{$var}()
○ (new ClassName())->{$var}()
PHP v5.5
● RegExp /e modifier deprecated
● Mysql extension officially deprecated
● boolval()
● empty() support any expression
● OPCache built-in
PHP v5.5
● “finally” supported
● Fully qualified classname constant
○ ClassName::CLASS
● Literal Dereferencing
○ [‘a’,’b’,’c’][1] will return ‘b’
● “foreach” support “list()”
○ foreach ($records as list($name, $email)) {}
● Generators & Co-routines
PHP v5.6
● Import functions & constants
○ use function NameSpacedmethod;
○ use const NameSpacedCONSTANT;
● Scalar expressions supported in
○ Constants: const FOO = self::BAR . “!”;
○ Class properties: public $a = 1 + 1;
○ Function arguments: function f($a = 1 + 1) {}
○ …
● __debugInfo()
PHP v5.6 (cont.)
● Variadic functions
○ Referencing
○ Type hinting
● Argument unpacking
● Exponent operator (**)
● Upload more than 2GB
ONE MORE THING...
THANK YOU!
Michael Bui
(FB & TW: MichaelBui2812)

More Related Content

PDF
The What, Why And How of ClojureScript
PDF
Ruby : Block, Proc and, lambda
PDF
How to Vim - for beginners
PDF
Groovy and Grails talk
PDF
Introduction to Containers and Docker for PHP developers
PDF
Container Days
PDF
Talk on PHP Day Uruguay about Docker
PDF
From framework coupled code to #microservices through #DDD /by @codelytv
The What, Why And How of ClojureScript
Ruby : Block, Proc and, lambda
How to Vim - for beginners
Groovy and Grails talk
Introduction to Containers and Docker for PHP developers
Container Days
Talk on PHP Day Uruguay about Docker
From framework coupled code to #microservices through #DDD /by @codelytv

Viewers also liked (20)

PDF
Developing and Deploying PHP with Docker
PDF
Open design at large scale
PDF
Docker for PHP Developers (NomadPHP)
PDF
Introduction to Docker
PDF
Docker & PHP - Practical use case
PDF
while42 Paris#13 - Building images for Scaleway using Docker
PPTX
Docker for PHP Developers - ZendCon 2016
PPTX
Compcon 2016 Workshop
DOCX
How to install and configure LEMP stack
PDF
Trabalhando em ambientes php com docker
PPTX
Docker for Developers - PNWPHP 2016 Workshop
PPTX
Creating Developer-Friendly Docker Containers with Chaperone
PPTX
Docker Compose
PPTX
6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014
PDF
An introduction to contianers and Docker for PHP developers
PDF
Rapid Application Development with Docker
PDF
Docker + Microservices in Production
PDF
Docker and Running multiple versions of PHP @ CareerZoo Dublin
PPTX
PHP development with Docker
PPTX
Real World Experience of Running Docker in Development and Production
Developing and Deploying PHP with Docker
Open design at large scale
Docker for PHP Developers (NomadPHP)
Introduction to Docker
Docker & PHP - Practical use case
while42 Paris#13 - Building images for Scaleway using Docker
Docker for PHP Developers - ZendCon 2016
Compcon 2016 Workshop
How to install and configure LEMP stack
Trabalhando em ambientes php com docker
Docker for Developers - PNWPHP 2016 Workshop
Creating Developer-Friendly Docker Containers with Chaperone
Docker Compose
6 Million Ways To Log In Docker - NYC Docker Meetup 12/17/2014
An introduction to contianers and Docker for PHP developers
Rapid Application Development with Docker
Docker + Microservices in Production
Docker and Running multiple versions of PHP @ CareerZoo Dublin
PHP development with Docker
Real World Experience of Running Docker in Development and Production
Ad

Similar to Php v5.3+ features (20)

PDF
Php 5.5
PPTX
Lua Study Share
PDF
Introduction to python programming [part 1]
PDF
Python Course Lecture Defining Functions
PDF
Symfony live 2017_php7_performances
PPT
Verilog lect 7
PDF
Profiling php5 to php7
ODP
Ruby Basics by Rafiq
PPTX
Learn JavaScript From Scratch
PDF
PHP 7 – What changed internally? (Forum PHP 2015)
PPTX
An in Depth Journey into Odoo's ORM
PDF
Hsc IT 5. Server-Side Scripting (PHP).pdf
PDF
SymfonyCon 2017 php7 performances
PPTX
Php 5.4: New Language Features You Will Find Useful
PDF
PHP 7 – What changed internally? (PHP Barcelona 2015)
PPT
SQL Devlopment for 10 ppt
PDF
Ruby training day1
PDF
JavaScript in 2016
Php 5.5
Lua Study Share
Introduction to python programming [part 1]
Python Course Lecture Defining Functions
Symfony live 2017_php7_performances
Verilog lect 7
Profiling php5 to php7
Ruby Basics by Rafiq
Learn JavaScript From Scratch
PHP 7 – What changed internally? (Forum PHP 2015)
An in Depth Journey into Odoo's ORM
Hsc IT 5. Server-Side Scripting (PHP).pdf
SymfonyCon 2017 php7 performances
Php 5.4: New Language Features You Will Find Useful
PHP 7 – What changed internally? (PHP Barcelona 2015)
SQL Devlopment for 10 ppt
Ruby training day1
JavaScript in 2016
Ad

Recently uploaded (20)

PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Transform Your Business with a Software ERP System
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
System and Network Administration Chapter 2
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Cost to Outsource Software Development in 2025
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
medical staffing services at VALiNTRY
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Digital Systems & Binary Numbers (comprehensive )
Upgrade and Innovation Strategies for SAP ERP Customers
Design an Analysis of Algorithms II-SECS-1021-03
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Transform Your Business with a Software ERP System
Which alternative to Crystal Reports is best for small or large businesses.pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
System and Network Administration Chapter 2
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Navsoft: AI-Powered Business Solutions & Custom Software Development
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Softaken Excel to vCard Converter Software.pdf
Cost to Outsource Software Development in 2025
Understanding Forklifts - TECH EHS Solution
Computer Software and OS of computer science of grade 11.pptx
Designing Intelligence for the Shop Floor.pdf
medical staffing services at VALiNTRY
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf

Php v5.3+ features

  • 1. PHP v5.3+ FEATURES Michael Bui (FB & TW: MichaelBui2812)
  • 2. PHP v5.3 ● “ereg” deprecated ● SPL always enabled ● Reflection always enabled ● Magic methods ○ __invoke() ○ __callStatic() ● Performance improved
  • 3. PHP v5.3 ● Namespace ○ PSR-0 ○ Composer ○ For classes, functions and constants ● Import classes ○ “use” keyword ○ relative & absolute namespaces ● Closures
  • 4. PHP v5.4 ● PHP_BINARY constant ● Array to string conversions will trigger a notice ● Array callbacks: ○ [$obj, ‘method’] ○ [‘ClassName’, ‘method’] ● Memory & performance improved
  • 5. PHP v5.4 ● Traits ○ “compiler level” copy-n-paste (literally) ○ “insteadof” & “as” to solve collisions ● Closures ○ Support “$this” ○ Re-bind “$this” ● Short echo tags “<?=...?>” always work ● Binary numbers (0b...)
  • 6. PHP v5.4 (Cont.) ● Short array syntax: ○ [‘a’=>1,’b’=>2] === array(‘a’=>1,’b’=>2) ○ Array dereferencing: getArray()[0]; ● Initiation time access ○ (new Classname())->method() ● Dynamic method calls: ○ ClassName::{$var}() ○ (new ClassName())->{$var}()
  • 7. PHP v5.5 ● RegExp /e modifier deprecated ● Mysql extension officially deprecated ● boolval() ● empty() support any expression ● OPCache built-in
  • 8. PHP v5.5 ● “finally” supported ● Fully qualified classname constant ○ ClassName::CLASS ● Literal Dereferencing ○ [‘a’,’b’,’c’][1] will return ‘b’ ● “foreach” support “list()” ○ foreach ($records as list($name, $email)) {} ● Generators & Co-routines
  • 9. PHP v5.6 ● Import functions & constants ○ use function NameSpacedmethod; ○ use const NameSpacedCONSTANT; ● Scalar expressions supported in ○ Constants: const FOO = self::BAR . “!”; ○ Class properties: public $a = 1 + 1; ○ Function arguments: function f($a = 1 + 1) {} ○ … ● __debugInfo()
  • 10. PHP v5.6 (cont.) ● Variadic functions ○ Referencing ○ Type hinting ● Argument unpacking ● Exponent operator (**) ● Upload more than 2GB
  • 12. THANK YOU! Michael Bui (FB & TW: MichaelBui2812)