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
Suitmedia PHP Coding Style
Search
Edwin Lunando
September 28, 2014
Technology
0
300
Suitmedia PHP Coding Style
The PHP coding guideline for Suitmedia developer
Edwin Lunando
September 28, 2014
Tweet
Share
More Decks by Edwin Lunando
See All by Edwin Lunando
Python di Industri
edwinlunando
0
51
HTTP 2 - Geekcamp
edwinlunando
1
150
Python ID Meetup Oktober 2015
edwinlunando
0
96
Python ID Meetup Agustus 2015
edwinlunando
0
350
Python ID Meetup Juni 2015
edwinlunando
0
53
Python ID Meetup April 2015
edwinlunando
0
110
Python 101 Workshop
edwinlunando
0
400
Python ID Meetup February 2015
edwinlunando
0
230
Intro to django-naomi
edwinlunando
0
530
Other Decks in Technology
See All in Technology
生成AIとM5Stack / M5 Japan Tour 2025 Autumn 東京
you
PRO
0
220
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
3
20k
E2Eテスト設計_自動化のリアル___Playwrightでの実践とMCPの試み__AIによるテスト観点作成_.pdf
findy_eventslides
1
410
SOC2取得の全体像
shonansurvivors
1
400
ユニットテストに対する考え方の変遷 / Everyone should watch his live coding
mdstoy
0
130
OCI Network Firewall 概要
oracle4engineer
PRO
1
7.8k
o11yで育てる、強い内製開発組織
_awache
3
120
Pure Goで体験するWasmの未来
askua
1
180
AIが書いたコードをAIが検証する!自律的なモバイルアプリ開発の実現
henteko
1
350
M5製品で作るポン置きセルラー対応カメラ
sayacom
0
160
Azure Well-Architected Framework入門
tomokusaba
1
310
Why React!?? Next.jsそしてReactを改めてイチから選ぶ
ypresto
10
4.5k
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
How GitHub (no longer) Works
holman
315
140k
Practical Orchestrator
shlominoach
190
11k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
KATA
mclloyd
32
15k
Automating Front-end Workflow
addyosmani
1371
200k
Gamification - CAS2011
davidbonilla
81
5.5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
How to Ace a Technical Interview
jacobian
280
24k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
Transcript
PHP Coding Style
[email protected]
[email protected]
Why? Everyone can easily read your codes just like reading
their own codes
Spaces is Better than Tabs 4 spaces per indent All
Editors have the same indent width Prettier code on Git
No ?> In The End of File Only for file
with all PHP codes Avoid additional new lines in generated document
One Statement Per Line Easier to see changes with side-by-side
diff
Multiple Line Argument Lists One argument per line Use when
have long argument lists
Position of Opening and Closing Braces Class and Function declaration
in new line Control Structures in the same line
Explicit Declaration of Visibility public or protected or private or
abstract or static or final
Camel Case for Method wowSuchMethod, muchCamel, soCase
Friendly Variable Names With Underscore Avoid $j, $i, $asd, $abc,
$temp Use $join_table, $counter_product, $temp_collection
Thank You source: www.php-fig.org