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
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
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
260
プロポーザルを書いてもらう
pvcresin
0
580
Android CLI
fornewid
0
240
MySQLとPostgreSQLって何が違うの?
akagami
0
140
ソフトウェアラスタライザ
fadis
1
660
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
440
Flow は今どうなっているか
mizdra
PRO
0
720
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
180
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
270
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
110
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
730
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
250
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
380
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
550
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
250
GitHub's CSS Performance
jonrohan
1033
470k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
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 ?>