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
Power Debugging & Profiling Your PHP Apps
Search
Abu Ashraf Masnun
January 12, 2023
Programming
0
74
Power Debugging & Profiling Your PHP Apps
Abu Ashraf Masnun
January 12, 2023
Tweet
Share
More Decks by Abu Ashraf Masnun
See All by Abu Ashraf Masnun
Background Task Processing in Celery
masnun
1
70
REST API Development
masnun
0
170
Golang For Scalable Systems
masnun
0
140
Email Validation using SMTP
masnun
0
87
Let's Get Going!
masnun
0
130
How to be Successful in Outsourcing
masnun
1
130
Other Decks in Programming
See All in Programming
Grafana:建立系統全知視角的捷徑
blueswen
0
330
CSC307 Lecture 08
javiergs
PRO
0
670
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
730
高速開発のためのコード整理術
sutetotanuki
1
400
Package Management Learnings from Homebrew
mikemcquaid
0
220
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
120
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
AtCoder Conference 2025
shindannin
0
1.1k
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
280
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
230
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
200
組織で育むオブザーバビリティ
ryota_hnk
0
170
Featured
See All Featured
Visualization
eitanlees
150
17k
Mind Mapping
helmedeiros
PRO
0
81
Making Projects Easy
brettharned
120
6.6k
Deep Space Network (abreviated)
tonyrice
0
47
WENDY [Excerpt]
tessaabrams
9
36k
Between Models and Reality
mayunak
1
190
How to train your dragon (web standard)
notwaldorf
97
6.5k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
140
From π to Pie charts
rasagy
0
120
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
Transcript
Power Debugging & Profiling Your PHP Apps Abu
Ashraf Masnun
WHAT’S YOUR STORY? Let’s share experiences!
Error Display • Turn on error display
• Report all errors • E_ALL | E_STRICT • Don’t ignore those “NoKce” messages
Print & Die • Output something and then terminate
the script. • var_dump() • print_r() • Output buffering for cleaner output • debug_backtrace()
Logging • Use a logging library (Monolog, anyone?)
• error_log() • mod_php sets stderr to apache logs: – file_put_contents('php://stderr', print_r($foo, TRUE)) • trigger_error() & set_error_handler() Tail your logs: tail -‐f your_log_file_path
InteresKng Tools • FirePHP, Chrome Logger • Kint,
PHP Debug Bar
THE MOTHER OF ALL DEBUGGER Let’s meet
ConfiguraKon
Netbeans
Netbeans
Netbeans
PROFILING LIKE A PRO
Start Profiling
The Cachegrind Files
Using Webgrind
@MASNUN Feel free to reach out: hap://masnun.me