PHP code example of mhdaldossari7 / php-fatal-err-catcher

1. Go to this page and download the library: Download mhdaldossari7/php-fatal-err-catcher 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/ */

    

mhdaldossari7 / php-fatal-err-catcher example snippets




declare (strict_types = 1);

// import class

$slackWebhookURL = "https://xxxxx"; // define slack url if you want to get notification in slack

new ErrorCatcher($slackWebhookURL); // initialize object ($slackWebhookURL is optional argument, if you didn't provide slack_url the error message will be print in console)


// (IMPORTANT NOTE) : You must create ErrorCatcher object at the beginning of your script, so it detects the incoming errors.