Skip to content

jedi58/PHPErrorLevelCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHPErrorLevelCalculator

Class for converting PHP constants for error levels from integers to strings and vice-versa.

Build Status Code Climate Coverage Status

Examples

ErrorLevelCalculator::toString(32767);

This will return the string E_ALL. It is also possible to construct more complicated examples such as:

ErrorLevelCalculator::toString(32765);

This will return E_ALL & ~E_WARNING. In addition to this, they can be built as:

ErrorLevelCalculator::toString(3);

This would return E_ERROR | E_WARNING.

The opposite of this is also true, the following:

ErrorLevelCalculator::toCode('E_ERROR | E_WARNING');

Would return 3.

About

Code for converting between strings and integers for PHP error levels

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages