repo.or.cz
/
hband-tools.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
output asked headers in the order they were asked; avoid header name spoofing by...
[hband-tools.git]
/
user-tools
/
error_reporting.php
blob
c85b9cadad37fc8efdbd41246a25074bb55ea84c
1
#!/usr/bin/env php
2
<
?php
3
4
$err_rep
=
isset
(
$argv
[
1
])
?
$argv
[
1
] :
error_reporting
();
5
6
foreach
(
get_defined_constants
()
as
$const
=>
$val
)
7
{
8
if
(
preg_match
(
'/^E_/'
,
$const
))
9
{
10
$mask
= (
$err_rep
&
$val
);
11
if
(
$mask
==
$val
)
$c
=
''
;
12
elseif
(
$mask
==
0
)
$c
=
'~'
;
13
else
$c
=
'#'
;
14
15
echo
"
$c
$const\n
"
;
16
}
17
}
18