[SOLVED] Integer Levels: How do they work?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

[SOLVED] Integer Levels: How do they work?

Post 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.
Post Reply