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
Kiroの仕様駆動開発から見えてきたAIコーディングとの正しい付き合い方
clshinji
1
200
モバイルアプリからWebへの横展開を加速した話_Claude_Code_実践術.pdf
kazuyasakamoto
0
310
個人軟體時代
ethanhuang13
0
310
testingを眺める
matumoto
1
130
機能追加とリーダー業務の類似性
rinchoku
2
1.1k
AIでLINEスタンプを作ってみた
eycjur
1
230
Vue・React マルチプロダクト開発を支える Vite
andpad
0
110
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
20
5.1k
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
410
KessokuでDIでもgoroutineを活用する / Go Connect #6
mazrean
0
140
RDoc meets YARD
okuramasafumi
4
160
The state patternの実践 個人開発で培ったpractice集
miyanokomiya
0
160
Featured
See All Featured
Side Projects
sachag
455
43k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.4k
The World Runs on Bad Software
bkeepers
PRO
70
11k
Site-Speed That Sticks
csswizardry
10
810
Being A Developer After 40
akosma
90
590k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
Become a Pro
speakerdeck
PRO
29
5.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Testing 201, or: Great Expectations
jmmastey
45
7.6k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Optimising Largest Contentful Paint
csswizardry
37
3.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