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
280
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
46
HTTP 2 - Geekcamp
edwinlunando
1
140
Python ID Meetup Oktober 2015
edwinlunando
0
89
Python ID Meetup Agustus 2015
edwinlunando
0
330
Python ID Meetup Juni 2015
edwinlunando
0
48
Python ID Meetup April 2015
edwinlunando
0
100
Python 101 Workshop
edwinlunando
0
370
Python ID Meetup February 2015
edwinlunando
0
200
Intro to django-naomi
edwinlunando
0
490
Other Decks in Technology
See All in Technology
Autify Company Deck
autifyhq
2
41k
インシデントキーメトリクスによるインシデント対応の改善 / Improving Incident Response using Incident Key Metrics
nari_ex
0
4.1k
信頼性を支えるテレメトリーパイプラインの構築 / Building Telemetry Pipeline with OpenTelemetry
ymotongpoo
9
5k
(Simutrans) 所要時間ベース経路検索のご紹介
teamhimeh
0
100
プロダクト価値を引き上げる、「課題の再定義」という習慣
moeka__c
0
210
Grid表示のレイアウトで Flow layoutsを使う
cffyoha
1
150
サービスローンチを成功させろ! 〜SREが教える30日間の攻略ガイド〜
mmmatsuda
2
4.4k
2025/1/29 BigData-JAWS 勉強会 #28 (re:Invent 2024 re:Cap)/new-feature-preview-q-in-quicksight-scenarios-tried-and-tested
emiki
0
310
もし今からGraphQLを採用するなら
kazukihayase
9
4.2k
教師なし学習の基礎
kanojikajino
4
360
一人から始めたSREチーム3年の歩み - 求められるスキルの変化とチームのあり方 - / The three-year journey of the SRE team, which started all by myself
vtryo
7
5.7k
[TechNight #86] Oracle GoldenGate - 23ai 最新情報&プロジェクトからの学び
oracle4engineer
PRO
1
170
Featured
See All Featured
Bash Introduction
62gerente
610
210k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
520
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Optimising Largest Contentful Paint
csswizardry
33
3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
270
Building Flexible Design Systems
yeseniaperezcruz
328
38k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
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