Category: error

A Crash Course of Changes to Exception Handling in PHP 7

Exception handling saves your code in the most unusual circumstances. PHP 7 has introduced two new classes that assist a developer in handling errors with ease, and that’s what we’ll look at in this post. Before the introduction of these classes in PHP 7, exception error classes were written to handle the d...

Local Development with Opera: Nginx 502 error

I was doing some local dev work recently, but for the first time in my “new” browser – Opera. I set up my [Homestead Improved](http://www.sitepoint.com/quick-tip-get-homestead-vagrant-vm-running/) instance and its virtual hosts as usual, but then couldn’t get anything other than a 502 error to s...

More Tips for Defensive Programming in PHP

The general definition of defensive programming (as seen in Part 1, an overview piece on Defensive Programming in PHP) being used here is thus: Defensive programming, simply put, is programming with the intent to anticipate likely failure points. The goal is to circumvent those likely problems before they occur. This...