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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
CSC307 Lecture 02
javiergs
PRO
1
780
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
AI巻き込み型コードレビューのススメ
nealle
1
160
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
270
CSC307 Lecture 08
javiergs
PRO
0
670
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
2026年 エンジニアリング自己学習法
yumechi
0
130
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
77
Marketing to machines
jonoalderson
1
4.6k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
49
30 Presentation Tips
portentint
PRO
1
210
We Are The Robots
honzajavorek
0
160
Visualization
eitanlees
150
17k
The Cult of Friendly URLs
andyhume
79
6.8k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
Writing Fast Ruby
sferik
630
62k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
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