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
Mihai Nica
November 11, 2015
Programming
120
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
510
Rapid Application Development with Symfony Framework
redecs
1
210
Making Emails Suck Less
redecs
0
100
Managing your code with Composer and Satis
redecs
0
180
Snapper.VU @ Fearless Conference 2015 - Romania
redecs
0
120
Other Decks in Programming
See All in Programming
Flow は今どうなっているか
mizdra
PRO
0
690
運用ダッシュボードの設計を誰も教えてくれないのだけどみなさんどうしてるんですか? - チームに監視するという文化を根付かせるための第一歩を踏みたい -
satoshi256kbyte
1
140
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
110
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
270
源内ハンズオン概要編
hideg
0
210
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
350
プロポーザルを書いてもらう
pvcresin
0
580
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
160
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
120
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
710
Dockerfile CMD for Node.js
grazie1999
0
120
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
170
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
220
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
The agentic SEO stack - context over prompts
schlessera
0
870
Code Reviewing Like a Champion
maltzj
528
40k
Statistics for Hackers
jakevdp
799
230k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.5k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
490
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.8k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
390
Being A Developer After 40
akosma
91
590k
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 ?>