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
69
REST API Development
masnun
0
170
Golang For Scalable Systems
masnun
0
140
Email Validation using SMTP
masnun
0
86
Let's Get Going!
masnun
0
130
How to be Successful in Outsourcing
masnun
1
130
Other Decks in Programming
See All in Programming
ノーコードからの脱出 -地獄のデスロード- / Escape from Base44
keisuke69
0
700
Kotlin + Power-Assert 言語組み込みならではのAssertion Library採用と運用ベストプラクティス by Kazuki Matsuda/Gen-AX
kazukima
0
110
ビルドプロセスをデバッグしよう!
yt8492
0
310
問題の見方を変える「システム思考」超入門
panda_program
0
200
高単価案件で働くための心構え
nullnull
0
130
Tangible Code
chobishiba
3
560
Eloquentを使ってどこまでコードの治安を保てるのか?を新人が考察してみた
itokoh0405
0
3.2k
アーキテクチャと考える迷子にならない開発者テスト
irof
8
2.9k
イベントストーミングのはじめかた / Getting Started with Event Storming
nrslib
1
500
Functional Calisthenics in Kotlin: Kotlinで「関数型エクササイズ」を実践しよう
lagenorhynque
0
130
flutter_kaigi_2025.pdf
kyoheig3
1
330
CSC509 Lecture 11
javiergs
PRO
0
310
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
The Language of Interfaces
destraynor
162
25k
A Tale of Four Properties
chriscoyier
162
23k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
GitHub's CSS Performance
jonrohan
1032
470k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.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