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
270
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
44
HTTP 2 - Geekcamp
edwinlunando
1
130
Python ID Meetup Oktober 2015
edwinlunando
0
79
Python ID Meetup Agustus 2015
edwinlunando
0
260
Python ID Meetup Juni 2015
edwinlunando
0
43
Python ID Meetup April 2015
edwinlunando
0
99
Python 101 Workshop
edwinlunando
0
310
Python ID Meetup February 2015
edwinlunando
0
150
Intro to django-naomi
edwinlunando
0
430
Other Decks in Technology
See All in Technology
プロデザ! BY リクルート vol.18_リクルートのリサーチ実践組織「リサーチブーストコミュニティ」
recruitengineers
PRO
3
240
反実仮想機械学習とは何か
usaito
PRO
6
1.7k
自動生成を活用した、運用保守コストを抑える Error/Alert/Runbook の一元集約管理 / Centralized management of Error/Alert/Runbook to minimize operational costs using automated code generation
biwashi
9
2.1k
Janus
bkuhlmann
1
490
インシデントレスポンスのライフサイクルを廻すポイントってなに / Pinpoints of Incidentresponse Lifecycle for Operation
sakaitakeshi
1
300
A (short) History of AI
harishpillay
0
110
Amplify Gen2を 拡張してみよう JAWS-UG北陸新幹線 ( 福井開催 ) 2024-04-06/Let's extend Amplify Gen2
fossamagna
0
280
Terraformあれやこれ/terraform-this-and-that
emiki
4
250
テストプロセスで大事にしていること #jasstnano
makky_tyuyan
0
110
DevOpsメトリクスとアウトカムの接続にトライ!開発プロセスを通して計測できるメトリクスの活用方法
ham0215
1
180
Autonomous Database Cloud 技術詳細 / adb-s_technical_detail_jp
oracle4engineer
PRO
14
35k
LLM とプロンプトエンジニアリング/チューターをビルドする / LLM and Prompt Engineering and Building Tutors
ks91
PRO
0
220
Featured
See All Featured
Clear Off the Table
cherdarchuk
83
310k
The Pragmatic Product Professional
lauravandoore
24
5.8k
The Art of Programming - Codeland 2020
erikaheidi
41
12k
Building a Modern Day E-commerce SEO Strategy
aleyda
16
6.3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
29
6k
Web Components: a chance to create the future
zenorocha
305
41k
The MySQL Ecosystem @ GitHub 2015
samlambert
242
12k
Imperfection Machines: The Place of Print at Facebook
scottboms
258
12k
A Modern Web Designer's Workflow
chriscoyier
689
190k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
1
1.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
13
1.5k
Designing on Purpose - Digital PM Summit 2013
jponch
110
6.4k
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