PHP Classes

Nero PHP Simulate Error: Throw fatal errors to test your application

Recommend this page to a friend!
  Info   View files Documentation   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 103 All time: 9,750 This week: 206Up
Version License PHP version Categories
nero 1.0.0The PHP License5PHP 5, Debug, Testing


This package can throw fatal errors to test your application.

It can simulate several types of errors and exceptions as if they were caused by code that has real issues.

Currently it can simulate PHP syntax error and class not found exceptions.

Innovation Award
PHP Programming Innovation award nominee
May 2018
Number 4
One way to verify whether applications are robust is to create tests to verify if they can handle cases that can happen in real world situations.

This package can simulate errors that may happen although they are never desired, like for instance code that has syntax errors or attempts to load missing classes.

Using this package you can avoid to ship to a production environment code that has serious errors that may cause embarrassment even to qualified developers.

Manuel Lemos
Picture of DeGraciaMathieu
  Performance   Level  
Name: DeGraciaMathieu <contact>
Classes: 16 packages by
Country: France France
Age: ???
All time rank: 297281 in France France
Week rank: 305 Up12 in France France Up
Innovation award
Innovation award
Nominee: 11x

Winner: 1x


<p align="center"> <img src="" width="250"> </p> <p align="center"> <a class="badge-align" href=";utm_medium=referral&amp;utm_content=DeGraciaMathieu/Nero&amp;utm_campaign=Badge_Grade"><img src=""/></a> <a href=""><img src="" alt="Scrutinizer Code Quality"></a> <a href=""><img src="" alt="Latest Version on Packagist"></a> <a href=''><img src='' /></a> </p>


This package allows you to simulate a fatal error in your PHP application


Run in console below command to download package to your project:

composer require degraciamathieu/nero

How use

There are two possibilities : `Breaker::syntaxError()` and `Breaker::classNotFound()`.

You can pass to these methods several criteria: a file, a specific line and a parameter.

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.

Basic usage

require 'vendor\autoload.php';

use \DeGraciaMathieu\Nero\Breaker;



require 'vendor\autoload.php';

use \DeGraciaMathieu\Nero\Breaker;



Usage with parameters

require 'vendor\autoload.php';

use \DeGraciaMathieu\Nero\Breaker;

Breaker::syntaxError('Website\routes\web.php', 120, ';');


require 'vendor\autoload.php';

use \DeGraciaMathieu\Nero\Breaker;

Breaker::classNotFound('Website\routes\web.php', 30, 'MySpecificClass');


  Files folder image Files  
File Role Description
Files folder imagesrc (3 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file Breaker.php Class Class source
  Plain text file Errors.php Class Class source
  Plain text file Executor.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:9,750
This week:206Up