PHP code example of memran / marwa-error-handler
1. Go to this page and download the library: Download memran/marwa-error-handler library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
memran / marwa-error-handler example snippets
use Marwa\ErrorHandler\ErrorHandler;
ErrorHandler::bootstrap(
appName: 'MyApp',
env: 'production',
logger: $logger,
debugbar: $debugReporter, // optional callable/object reporter
);
$handler = new ErrorHandler(appName: 'MyApp', env: 'development');
$handler->setLogger($logger);
$handler->setDebugbar($debugReporter);
$handler->register();