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
Exception Handling in PHP
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Frank Neff
November 06, 2014
Programming
2
130
Exception Handling in PHP
A lightning Talk about exception handling best practices in PHP for one of our customers
Frank Neff
November 06, 2014
Tweet
Share
More Decks by Frank Neff
See All by Frank Neff
Principles of Object Orientation
frne
0
330
Symfony High Availability in the Cloud
frne
0
630
Symfony 3 [german]
frne
0
420
Solr für Volltext-Suche oder gleich als Datenbank Engine
frne
0
370
Plaing with Neo4j -[:USING]-> PHP
frne
0
460
PHP under the hood
frne
3
220
Other Decks in Programming
See All in Programming
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.4k
Mastering Event Sourcing: Your Parents Holidayed in Yugoslavia
super_marek
0
120
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.2k
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
590
CSC307 Lecture 15
javiergs
PRO
0
270
20260315 AWSなんもわからん🥲
chiilog
2
180
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
570
おれのAgentic Coding 2026/03
tsukasagr
1
110
AI活用のコスパを最大化する方法
ochtum
0
340
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
170
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
170
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
240
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
91
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
300
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
230
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
300
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
700
エンジニアに許された特別な時間の終わり
watany
106
240k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
Being A Developer After 40
akosma
91
590k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
Transcript
try { Exception Handling in PHP } A brief introduction
Exception != Error
– docs.oracle.com “An exception is an event, which occurs during
the execution of a program, that disrupts the normal flow of the program's instructions.”
– php.net/manual “When an exception is thrown, code following the
statement will not be executed, and PHP will attempt to find the first matching catch block. If an exception is not caught, a PHP Fatal Error will be issued with an "Uncaught Exception ..." message”
Application Layers Presentation Business Data NoDatabaseConnectionException NoResultException EmptyResultException InvalidConfigurationException HTTP/404
HTTP/500
Example EVIL!
– Me “Because a DBAL does not know how to
handle an empty result… But the business logic does!”
Done right
Done right
Pass Exceptions through layers
Exceptions
DBAL
Repository
Controller
– OSS Development Wisdom “An API method should always return
an expected result or throw an exception.”
Thanks ;) frankneff.ch - @frank_neff - github.com/frne