Created
March 1, 2023 11:33
-
-
Save zguillez/3b7246e17911bf8328667518fbd4d326 to your computer and use it in GitHub Desktop.
Display errors and warnings in PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* require_once __DIR__ . '/inc/debug.php'; | |
* $debugger = new Debug(true); | |
*/ | |
class Debug | |
{ | |
public function __construct($debug) | |
{ | |
if ($debug) { | |
ini_set('display_startup_errors', 1); | |
ini_set('display_errors', 1); | |
error_reporting(-1); | |
} | |
date_default_timezone_set('Europe/Madrid'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment