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
200
Making Emails Suck Less
redecs
0
81
Managing your code with Composer and Satis
redecs
0
160
Snapper.VU @ Fearless Conference 2015 - Romania
redecs
0
110
Other Decks in Programming
See All in Programming
Fundamentals of Software Engineering In the Age of AI
therealdanvega
1
250
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
230
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
370
Docコメントで始める簡単ガードレール
keisukeikeda
1
110
LangChain4jとは一味違うLangChain4j-CDI
kazumura
1
170
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
230
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
200
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.2k
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
400
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
130
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
900
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
830
Featured
See All Featured
Crafting Experiences
bethany
1
83
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
670
New Earth Scene 8
popppiees
1
1.7k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
290
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Deep Space Network (abreviated)
tonyrice
0
89
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
130
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
320
A Modern Web Designer's Workflow
chriscoyier
698
190k
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 ?>