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
480
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
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.2k
我々はなぜ「層」を分けるのか〜「関心の分離」と「抽象化」で手に入れる変更に強いシンプルな設計〜 #phperkaigi / PHPerKaigi 2026
shogogg
2
700
モダンOBSプラグイン開発
umireon
0
190
How to stabilize UI tests using XCTest
akkeylab
0
150
安いハードウェアでVulkan
fadis
1
830
AI活用のコスパを最大化する方法
ochtum
0
350
夢の無限スパゲッティ製造機 -実装篇- #phpstudy
o0h
PRO
0
170
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
270
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
0
180
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
1.6k
へんな働き方
yusukebe
6
2.9k
ロボットのための工場に灯りは要らない
watany
12
3.2k
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Facilitating Awesome Meetings
lara
57
6.8k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
76
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Skip the Path - Find Your Career Trail
mkilby
1
92
Utilizing Notion as your number one productivity tool
mfonobong
4
270
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
New Earth Scene 8
popppiees
2
1.9k
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 ?>