-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathErrorMap.php
More file actions
46 lines (41 loc) · 857 Bytes
/
ErrorMap.php
File metadata and controls
46 lines (41 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
class ErrorMap extends BitMap {
protected $indexes = array(
'error',
'warning',
'parse',
'notice',
'core_error',
'core_warning',
'compile_error',
'compile_warning',
'user_error',
'user_warning',
'user_notice',
'strict',
'recoverable_error',
'depreciated',
);
public function __construct($v) {
$this->indexes = array_flip($this->indexes);
parent::__construct($v);
}
}
/*
$o = new ErrorMask(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
foreach ($o as $k=>$v) echo $k, ' => ', $v?'true':'false', "\n";
// error => true
// warning => true
// parse => true
// notice => true
// core_error => true
// core_warning => true
// compile_error => true
// compile_warning => true
// user_error => false
// user_warning => false
// user_notice => false
// strict => false
// recoverable_error => false
// depreciated => false
*/