php - How to check if an error code matches error_reporting -


let's have error_reporting set e_all & ~e_strict , error of level e_user_notice (or other level) triggered.

how can check if e_user_notice matches or doesn't match above e_all & ~e_strict?

to clarify, given example above, if error_reporting(e_all & ~e_strict) equaled array of [e_error, e_notice, e_warning ...], how check if e_notice in metaphorical array.

this should easy and operation. check following:

$errorlevels = e_error | e_notice; echo $errorlevels & e_notice ? 'match' : 'mismatch'; 

Comments