Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PHP v5.3+ Features
Search
Michael Bui
September 29, 2014
Programming
0
72
PHP v5.3+ Features
Overview of main features from PHP v5.3 until current v5.6
Michael Bui
September 29, 2014
Tweet
Share
More Decks by Michael Bui
See All by Michael Bui
Boeing (BA) Analysis - Adam Khoo | Group O 2018
michaelbui
0
150
Asynchronous processing using AWS Services
michaelbui
0
46
Microservice
michaelbui
2
770
Other Decks in Programming
See All in Programming
Implementation Patterns
denyspoltorak
0
140
AI Agent Dojo #4: watsonx Orchestrate ADK体験
oniak3ibm
PRO
0
120
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
630
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
140
AtCoder Conference 2025
shindannin
0
900
Python札幌 LT資料
t3tra
7
1.1k
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
180
Vibe codingでおすすめの言語と開発手法
uyuki234
0
160
Cap'n Webについて
yusukebe
0
160
TestingOsaka6_Ozono
o3
0
260
ゆくKotlin くるRust
exoego
1
190
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
430
Featured
See All Featured
Speed Design
sergeychernyshev
33
1.5k
Balancing Empowerment & Direction
lara
5
840
Music & Morning Musume
bryan
46
7k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
400
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
78
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
The Cult of Friendly URLs
andyhume
79
6.7k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
720
Deep Space Network (abreviated)
tonyrice
0
33
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
It's Worth the Effort
3n
187
29k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
2
280
Transcript
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
Name\Spaced\method; ◦ use const Name\Spaced\CONSTANT; • 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)