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
80
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PHP v5.3+ Features
Overview of main features from PHP v5.3 until current v5.6
Michael Bui
September 29, 2014
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
56
Microservice
michaelbui
2
800
Other Decks in Programming
See All in Programming
今さら聞けない .NET CLI
htkym
0
200
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
1
220
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
160
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
390
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
160
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
180
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
540
What's New in Android 2026
veronikapj
0
270
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
150
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
200
AI時代に設計が 最大の生産性レバーになる 意図駆動開発とデータを消さない設計|Don't Delete Your Data or Your Intent — Design as the Deepest Lever in the AI Era
tomohisa
1
1.1k
「人を評価する AI」の設計と実装
ryoyanara
0
220
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
Speed Design
sergeychernyshev
33
2k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
430
A Soul's Torment
seathinner
6
3.5k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Side Projects
sachag
455
43k
Abbi's Birthday
coloredviolet
3
9.4k
Writing Fast Ruby
sferik
630
63k
The Cult of Friendly URLs
andyhume
79
7k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
170
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
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)