paq85/phpstarter

Set of tools for a good start of PHP project

v1.0.0 2015-03-23 10:05 UTC

This package is not auto-updated.

Last update: 2024-06-08 15:28:08 UTC


README

Build Status Packagist Version

Takes care preparing PHP's settings to let you work on a well written project

\Paq\PhpStarter\PhpStarter::start();

What does it do?

  • Report all Errors
  • Convert PHP Errors, Notices etc. to Exceptions

Why?

  • Having error reporting enabled with conversion to exceptions gives you full control over your code. It makes writing automatic tests easier which let's you provide much better software. Many people disable error reporting in Production. IMHO it should be ENABLED on all environments.

Convert PHP Errors, Notices etc. to Exceptions

If you only want to convert PHP Errors to Exceptions use

\Paq\PhpStarter\PhpStarter::convertErrorsToExceptions();

Tips

You SHOULD NOT use "@" (Inline Error Suppression) in your code.

See PHP The Right Way: Errors and Exceptions

Credits

Thanks to

Useful links