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
50
HTTP 2 - Geekcamp
edwinlunando
1
150
Python ID Meetup Oktober 2015
edwinlunando
0
95
Python ID Meetup Agustus 2015
edwinlunando
0
350
Python ID Meetup Juni 2015
edwinlunando
0
52
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
DDD集約とサービスコンテキスト境界との関係性
pandayumi
2
280
バッチ処理で悩むバックエンドエンジニアに捧げるAWS Glue入門
diggymo
3
190
初めてAWSを使うときのセキュリティ覚書〜初心者支部編〜
cmusudakeisuke
1
230
AIのグローバルトレンド2025 #scrummikawa / global ai trend
kyonmm
PRO
1
260
未経験者・初心者に贈る!40分でわかるAndroidアプリ開発の今と大事なポイント
operando
4
350
MCPで変わる Amebaデザインシステム「Spindle」の開発
spindle
PRO
3
3.2k
なぜテストマネージャの視点が 必要なのか? 〜 一歩先へ進むために 〜
moritamasami
0
210
人工衛星のファームウェアをRustで書く理由
koba789
13
7.1k
Autonomous Database - Dedicated 技術詳細 / adb-d_technical_detail_jp
oracle4engineer
PRO
4
10k
ハードウェアとソフトウェアをつなぐ全てを内製している企業の E2E テストの作り方 / How to create E2E tests for a company that builds everything connecting hardware and software in-house
bitkey
PRO
1
120
Snowflakeの生成AI機能を活用したデータ分析アプリの作成 〜Cortex AnalystとCortex Searchの活用とStreamlitアプリでの利用〜
nayuts
1
460
生成AI時代のデータ基盤設計〜ペースレイヤリングで実現する高速開発と持続性〜 / Levtech Meetup_Session_2
sansan_randd
1
150
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
Building Applications with DynamoDB
mza
96
6.6k
Art, The Web, and Tiny UX
lynnandtonic
302
21k
Code Reviewing Like a Champion
maltzj
525
40k
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
Optimizing for Happiness
mojombo
379
70k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
111
20k
The Art of Programming - Codeland 2020
erikaheidi
55
13k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
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