Page 1 of 1

[SOLVED] Integer Levels: How do they work?

Posted: Fri May 13, 2005 6:23 pm
by Ambush Commander
EDIT|Nevermind: solved by actually *reading* the bitwise operator documentation + comments.

In http://us4.php.net/manual/en/function.e ... orting.php you can see that there's a chart of constants and their integer values.

Code: Select all

value	constant
1	E_ERROR
2	E_WARNING
4	E_PARSE
8	E_NOTICE
16	E_CORE_ERROR
32	E_CORE_WARNING
64	E_COMPILE_ERROR
128	E_COMPILE_WARNING
256	E_USER_ERROR
512	E_USER_WARNING
1024	E_USER_NOTICE
2047	E_ALL
2048	E_STRICT
It then gives examples of using binary operators to change these values. When you pass them to the error_reporting function, you can mix-and-match errors.

How does this work??? I'd like to implement this for one of my own tagging schemes.