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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
490
Rapid Application Development with Symfony Framework
redecs
1
210
Making Emails Suck Less
redecs
0
92
Managing your code with Composer and Satis
redecs
0
170
Snapper.VU @ Fearless Conference 2015 - Romania
redecs
0
120
Other Decks in Programming
See All in Programming
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
170
AIで効率化できた業務・日常
ochtum
0
140
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
250
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
270
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
150
Contextとはなにか
chiroruxx
1
330
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
710
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.4k
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
170
Oxcを導入して開発体験が向上した話
yug1224
4
320
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
660
技術的負債解消で開発者の未来を開く- AIの力でコード刷新
kmd2kmd
0
110
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
230
How STYLIGHT went responsive
nonsquared
100
6.2k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Ruling the World: When Life Gets Gamed
codingconduct
0
260
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
140
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
320
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
210
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
420
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
270
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
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 ?>