How to Debug and Log in PHP
This guide explains how errors work in PHP and how to debug them efficiently using logging functions and Sentry. The information in this guide is correct for PHP 8 and perhaps above, depending on how much future PHP versions change.