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
75
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
150
Email Validation using SMTP
masnun
0
88
Let's Get Going!
masnun
0
130
How to be Successful in Outsourcing
masnun
1
130
Other Decks in Programming
See All in Programming
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
680
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
820
Windows on Ryzen and I
seosoft
0
330
The free-lunch guide to idea circularity
hollycummins
0
290
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.3k
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
230
CSC307 Lecture 15
javiergs
PRO
0
260
へんな働き方
yusukebe
5
2.7k
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.4k
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1.1k
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
190
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
220
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Fireside Chat
paigeccino
42
3.8k
WENDY [Excerpt]
tessaabrams
9
37k
Paper Plane
katiecoart
PRO
0
48k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
85
Building Applications with DynamoDB
mza
96
7k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
320
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
290
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
91
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
860
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
240
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
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