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
プロダクトのコードから見るGoによるデザインパターンの実践 #go_night_talk
bengo4com
1
2.3k
AI時代だからこそ考える、僕らが本当につくりたいスクラムチーム / A Scrum Team we really want to create in this AI era
takaking22
8
4.1k
社内お問い合わせBotの仕組みと学び
nish01
1
550
"プロポーザルってなんか怖そう"という境界を超えてみた@TSUDOI by giftee Tech #1
shilo113
0
170
そのWAFのブロック、どう活かす? サービスを守るための実践的多層防御と思考法 / WAF blocks defense decision
kaminashi
0
150
AWS Top Engineer、浮いてませんか? / As an AWS Top Engineer, Are You Out of Place?
yuj1osm
2
210
ユーザーの声とAI検証で進める、プロダクトディスカバリー
sansantech
PRO
1
120
綺麗なデータマートをつくろう_データ整備を前向きに考える会 / Let's create clean data mart
brainpadpr
3
370
The Cake Is a Lie... And So Is Your Login’s Accessibility
leichteckig
0
110
[Codex Meetup Japan #1] Codex-Powered Mobile Apps Development
korodroid
0
100
Where will it converge?
ibknadedeji
0
200
三菱電機・ソニーグループ共同の「Agile Japan企業内サテライト」_2025
sony
0
130
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Designing for humans not robots
tammielis
254
26k
Why Our Code Smells
bkeepers
PRO
339
57k
Unsuck your backbone
ammeep
671
58k
A designer walks into a library…
pauljervisheath
209
24k
For a Future-Friendly Web
brad_frost
180
9.9k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Code Reviewing Like a Champion
maltzj
525
40k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
[RailsConf 2023] Rails as a piece of cake
palkan
57
5.9k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
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