Description
Force PHP to display all errors and warnings on screen. Drop in at the top of a script when something fails silently.
Snippet
php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);Notes
Local debugging only — never leave this in production code, since displayed errors leak paths, queries, and config. display_startup_errors only catches startup failures if the failure happens after this line runs; for earlier ones, set it in php.ini.