Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Talks #75 - PHP 7
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Mihai Nica
November 11, 2015
Programming
130
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
More Decks by Mihai Nica
See All by Mihai Nica
Making the most out of Symfony Forms
redecs
0
530
Rapid Application Development with Symfony Framework
redecs
1
220
Making Emails Suck Less
redecs
0
110
Managing your code with Composer and Satis
redecs
0
190
Snapper.VU @ Fearless Conference 2015 - Romania
redecs
0
130
Other Decks in Programming
See All in Programming
最近”作らせてる” ローカルAIアプリの話
akit37
0
500
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
1.8k
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
460
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
11
8.3k
JIS keyboard support in Omarchy
lef237
0
160
Railsバージョンを4倍にした話
optim
0
730
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
1k
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
120
APNsからLive Activityを開始する話
yumnumm
0
180
Jetpack Compose Mechanisms
skydoves
3
870
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
200
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
130
Featured
See All Featured
Believing is Seeing
oripsolob
1
250
The SEO identity crisis: Don't let AI make you average
varn
0
610
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
320
Building the Perfect Custom Keyboard
takai
2
920
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Code Review Best Practice
trishagee
74
20k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
750
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
330
Code Reviewing Like a Champion
maltzj
529
40k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
960
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 ?>