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
Introduction to PHP 7
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Paul McBride
February 05, 2016
Technology
1
89
Introduction to PHP 7
A short presentation highlighting the new and removed features of PHP 7
Paul McBride
February 05, 2016
Tweet
Share
More Decks by Paul McBride
See All by Paul McBride
An Introduction to React Hooks
thepaulmcbride
0
47
Lessons Learned as a Self-taught Developer
thepaulmcbride
0
41
Other Decks in Technology
See All in Technology
Agile Leadership Summit Keynote 2026
m_seki
1
610
変化するコーディングエージェントとの現実的な付き合い方 〜Cursor安定択説と、ツールに依存しない「資産」〜
empitsu
4
1.4k
Data Hubグループ 紹介資料
sansan33
PRO
0
2.7k
OpenShiftでllm-dを動かそう!
jpishikawa
0
110
20260204_Midosuji_Tech
takuyay0ne
1
150
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
170
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
230
SREが向き合う大規模リアーキテクチャ 〜信頼性とアジリティの両立〜
zepprix
0
450
30万人の同時アクセスに耐えたい!新サービスの盤石なリリースを支える負荷試験 / SRE Kaigi 2026
genda
4
1.3k
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
0
140
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
410
外部キー制約の知っておいて欲しいこと - RDBMSを正しく使うために必要なこと / FOREIGN KEY Night
soudai
PRO
12
5.4k
Featured
See All Featured
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
640
Measuring & Analyzing Core Web Vitals
bluesmoon
9
750
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
340
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
65
RailsConf 2023
tenderlove
30
1.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Ruling the World: When Life Gets Gamed
codingconduct
0
140
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
100
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
Odyssey Design
rkendrick25
PRO
1
490
Bash Introduction
62gerente
615
210k
Transcript
Introduction to PHP 7 PAUL MCBRIDE @pmcbride446
OVERVIEW ̣ History of PHP ̣ Whats new in PHP
7 ̣ Removed and deprecated features ̣ References ̣ Questions
History of PHP Jun 1995 Released by Rasmus Lerdorf Jun
1998 PHP 3 Released May 2000 PHP 4 Released
Jul 2004 PHP 5 Released 2005 Work starts on PHP
6 May 2003 Wordpress 1.0
Dec 2015 PHP 7 Released Mar 2010 PHP 6 is
abandoned Feb 2016 Paul gives a great talk on PHP 7
New Features
SCALAR TYPE DECLARATIONS <?php function greeting(string $name) { return
"Hello, {$name}"; } ̣ String ̣ Integer ̣ Float ̣ Boolean New types
RETURN TYPES <?php declare(strict_types=1); function sum($a, $b): int
{ return $a + $b; } echo sum(1, 5.5);
NULL COALESCING OPERATOR <?php // Pre PHP 7 $username
= isset($_GET['user']) ? $_GET['user'] : 'nobody'; <?php $username = $_GET['user'] ?? 'nobody'; <?php $username = $_GET['user'] ?? $_POST['user'] ?? 'nobody';
None
SPACESHIP OPERATOR <?php // Integers echo 1 <=> 1;
// 0 echo 1 <=> 2; // -1 echo 2 <=> 1; // 1 // Floats echo 1.5 <=> 1.5; // 0 echo 1.5 <=> 2.5; // -1 echo 2.5 <=> 1.5; // 1 // Strings echo "a" <=> "a"; // 0 echo "a" <=> "b"; // -1 echo "b" <=> "a"; // 1
CONSTANT ARRAYS <?php define('ANIMALS', [ 'dog', 'cat', 'bird' ]);
echo ANIMALS[1]; // outputs "cat" Arrays can now now be defined using define()
ANONYMOUS CLASSES <?php new class { public function log(string
$message) { echo $message; } };
GROUP USE DECLARATIONS <?php // Pre PHP 7 code
use some\namespace\ClassA; use some\namespace\ClassB; use some\namespace\ClassC as C; <?php // PHP 7+ code use some\namespace\{ClassA, ClassB, ClassC as C};
PERFORMANCE
PERFORMANCE
OTHER FEATURES ̣ Better unicode support ̣ Integer division with
intdiv() ̣ Improved error handling ̣ Session_start() can now take an options array ̣ unserialize() filter ̣ CSPRNG Functions
DEPRECATED/REMOVED FEATURES
REMOVED FEATURES ereg_* ̣ ASP-style tags ̣ PHP script tags
̣ All functions ̣ The mysql extension (and the functions) <% <%= %> <script language=”php”> mysql_*
DEPRECATED FEATURES ̣ PHP 4 style constructors ̣ Static calls
to non-static methods ̣ Salt option for password_hash()
REFERENCES ̣ http://php.net ̣ https://www.digitalocean.com/company/blog/ getting-ready-for-php-7/
QUESTIONS?
THANKS FOR LISTENING! PAUL MCBRIDE @pmcbride446 joind.in/16983