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
70
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
68
REST API Development
masnun
0
160
Golang For Scalable Systems
masnun
0
130
Email Validation using SMTP
masnun
0
84
Let's Get Going!
masnun
0
130
How to be Successful in Outsourcing
masnun
1
120
Other Decks in Programming
See All in Programming
AWS発のAIエディタKiroを使ってみた
iriikeita
1
190
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
460
250830 IaCの選定~AWS SAMのLambdaをECSに乗り換えたときの備忘録~
east_takumi
0
400
為你自己學 Python - 冷知識篇
eddie
1
350
請來的 AI Agent 同事們在寫程式時,怎麼用 pytest 去除各種幻想與盲點
keitheis
0
120
さようなら Date。 ようこそTemporal! 3年間先行利用して得られた知見の共有
8beeeaaat
3
1.5k
今だからこそ入門する Server-Sent Events (SSE)
nearme_tech
PRO
3
240
Compose Multiplatform × AI で作る、次世代アプリ開発支援ツールの設計と実装
thagikura
0
170
Tool Catalog Agent for Bedrock AgentCore Gateway
licux
7
2.5k
AIコーディングAgentとの向き合い方
eycjur
0
280
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
Navigation 2 を 3 に移行する(予定)ためにやったこと
yokomii
0
330
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.6k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Cult of Friendly URLs
andyhume
79
6.6k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Embracing the Ebb and Flow
colly
87
4.8k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Building Adaptive Systems
keathley
43
2.7k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
530
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Documentation Writing (for coders)
carmenintech
74
5k
Six Lessons from altMBA
skipperchong
28
4k
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