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
Talks #75 - PHP 7
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Mihai Nica
November 11, 2015
Programming
1
110
Talks #75 - PHP 7
PHP7 it's almost ready. Let's do a quick review of the biggest PHP release since 5.3.
Mihai Nica
November 11, 2015
Tweet
Share
More Decks by Mihai Nica
See All by Mihai Nica
Making the most out of Symfony Forms
redecs
0
470
Rapid Application Development with Symfony Framework
redecs
1
190
Making Emails Suck Less
redecs
0
79
Managing your code with Composer and Satis
redecs
0
150
Snapper.VU @ Fearless Conference 2015 - Romania
redecs
0
110
Other Decks in Programming
See All in Programming
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
Fluid Templating in TYPO3 14
s2b
0
130
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
530
「ブロックテーマでは再現できない」は本当か?
inc2734
0
970
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
550
ぼくの開発環境2026
yuzneri
0
210
dchart: charts from deck markup
ajstarks
3
990
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
組織で育むオブザーバビリティ
ryota_hnk
0
170
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
260
MUSUBIXとは
nahisaho
0
130
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
The Pragmatic Product Professional
lauravandoore
37
7.1k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
92
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
Evolving SEO for Evolving Search Engines
ryanjones
0
120
Six Lessons from altMBA
skipperchong
29
4.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Transcript
<?PHP 7 PHP developers don’t know how to count
PHP 7 Highlights • Scalar type declarations • Return type
declarations • Null coalesce operator ?? • Combined comparison operator <=> • Anonymous classes • Way faster then previous release
Scalar Typehints • bool, float, int, string • declare(strict_types=1) •
function sum(int $a, int $b) { return $a + $b }
Return type declarations • Same types as for argument type
declarations • function sum(int $a, int $b):int { return $a + $b }
Null coalesce operator ?? • Because we are lazy and
other languages have it • $u = isset($_GET['user']) ? $_GET['user'] : 'nobody'; becomes $u = $_GET['user'] ?? 'nobody';
Combined comparison operator <=> • aka Spaceship operator • sorting
the right way • echo 1 <=> 1; // 0 echo 1 <=> 2; // -1 echo 2 <=> 1; // 1
Anonymous classes • Throwaway objects made easy • Testers rejoice
• $app = new Application; $app->setLogger(new class implements Logger { public function log(string $msg) { echo $msg; } });
2X faster?! • PHP Framework Benchmark available on Github: http://rtr.im/y
• Virtual machine (2 cores @ 3.4GHz, 4GB RAM) running Ubuntu 14.04 • nginx 1.6 + php-fpm
PHP 5.5.15
PHP 7.0 RC7
FRAMEWORK REQUEST PER SECOND PHP 5.5.15 PHP 7 - RC7
PHALCON-2.0 1469 6605 CI-3.0 314 918 LUMEN-5.1 223 1345 YII-2.0 189 363 SILEX-1.3 486 1822 AURA-2.0 257 1080 CAKE-3.1 174 472 SYMFONY-2.7 167 326 LARAVEL-5.1 80 72 ZF-2.5 40 445
•
[email protected]
• https://twiter.com/redecs • https://facebook.com/redecs Mihai
Nica ?>