Recently I have been trying the Whoops! library and trying to get it to work, however, unfortunately this is the closest I have gotten to get it working.
I installed it via the composer using this tutorial https://code.tutsplus.com/tutorials/whoops-php-errors-for-cool-kids--net-32344
PHP:
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
# index.php
require(getcwd() . "/vendor/autoload.php");
$whoops = new Whoops\Run();
$whoops->pushHandler(new Whoops\Handler\PrettyPageHandler());
// Set Whoops as the default error and exception handler used by PHP:
$whoops->register();
throw new RuntimeException("Oopsie!");
?>
Error:
Fatal error: Uncaught Error: Class 'Whoops\Run' not found in C:\Users\Administrator\Desktop\CMS\app\library\whoops\index.php:9 Stack trace: #0 {main} thrown in C:\Users\Administrator\Desktop\CMS\app\library\whoops\index.php on line 9