, (*1)
, (*2)
DeGraciaMathieu/Nero
This package allows you to simulate a fatal error in your PHP application, (*3)
Installation
Run in console below command to download package to your project:, (*4)
composer require degraciamathieu/nero
How use
There are two possibilities : Breaker::syntaxError()
and Breaker::classNotFound()
., (*5)
You can pass to these methods several criteria: a file, a specific line and a parameter., (*6)
require 'vendor\autoload.php';
use \DeGraciaMathieu\Nero\Breaker;
Breaker::syntaxError($file = null, $line = null, $parameter = null);
By default the method will automatically complete all these criteria., (*7)
Basic usage
require 'vendor\autoload.php';
use \DeGraciaMathieu\Nero\Breaker;
Breaker::syntaxError();
, (*8)
require 'vendor\autoload.php';
use \DeGraciaMathieu\Nero\Breaker;
Breaker::classNotFound();
, (*9)
Usage with parameters
require 'vendor\autoload.php';
use \DeGraciaMathieu\Nero\Breaker;
Breaker::syntaxError('Website\routes\web.php', 120, ';');
, (*10)
require 'vendor\autoload.php';
use \DeGraciaMathieu\Nero\Breaker;
Breaker::classNotFound('Website\routes\web.php', 30, 'MySpecificClass');
, (*11)