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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
300
15年目のiOSアプリを1から作り直す技術
teakun
0
460
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.9k
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
340
kintone + ローカルLLM = ?
akit37
0
110
Gemini for developers
meteatamel
0
120
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
1k
CSC307 Lecture 10
javiergs
PRO
1
690
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
180
ふん…おもしれぇ Parser。RubyKaigi 行ってやるぜ
aki_pin0
0
110
2026年は Rust 置き換えが流行る! / 20260220-niigata-5min-tech
girigiribauer
0
110
あなたはユーザーではない #PdENight
kajitack
4
200
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
190
30 Presentation Tips
portentint
PRO
1
240
The Curse of the Amulet
leimatthew05
1
9k
The Invisible Side of Design
smashingmag
302
51k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Design in an AI World
tapps
0
150
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
78
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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 ?>