Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
UpstatePHP 101: Object Mayhem
Search
Andrew Lechowicz
May 19, 2016
Programming
39
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
UpstatePHP 101: Object Mayhem
Andrew Lechowicz
May 19, 2016
Other Decks in Programming
See All in Programming
R8 の設定見直しでアプリサイズ削減
andpad
0
220
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5.2k
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
phperだってパンチカードでコーディングしたい
o0h
PRO
0
340
ジョジョの世界をXRで再現する
mofurune
0
160
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
0
210
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
Featured
See All Featured
Practical Orchestrator
shlominoach
192
12k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Design in an AI World
tapps
1
350
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
570
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
How to train your dragon (web standard)
notwaldorf
96
6.9k
Making Projects Easy
brettharned
120
6.8k
Transcript
UpstatePHP 101
Object Mayhem
Andrew Lechowicz
Programming Languages are Tools • PHP • Erlang • C/C++
• Java • JavaScript • Chicken • Ruby
And Many Many More
Not Every Language has Every Feature • PHP had some
basic OOP features in 4.0 • 5.0 has a full object model
"If all you have is a hammer, everything looks like
a nail." — Proverb
Blueprints & Houses Classes & Objects
Classes • Classes -> Blueprints • Contain all the informa5on
needed to build a house • Can't live in a blueprint
Objects • Objects -> Houses • Instan2ated Classes
A Basic Class class ClassName { } • Begin with
class • Followed by the name of the class ClassName • Curly braces surround the defini:on {...}
Proper&es & Methods class ClassName { public $var = 'a
default value'; // method declaration public function displayVar() { echo $this->var; } } • Constants -> Constants • Variables -> Proper3es • Func3ons -> Methods
It's All About Context
What is $this? • $this is a reference to the
calling object
New Objects! <?php $instance = new SimpleClass(); // This can
also be done with a variable: $className = 'SimpleClass'; $instance = new $className(); // new SimpleClass()
Let's Code