Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
7 | function pre($var, $die = FALSE) |
||
8 | { |
||
9 | $html = '<pre style="padding:10px;margin:0;display:block;background: #EEE; box-shadow: inset 0 0 3px 3px #DDD; color: #666; text-shadow: 1px 1px 1px #CCC;border-radius: 5px;">'; |
||
10 | $html .= (is_null($var)) ? '<b>NULL</b>' : print_r($var, TRUE); |
||
11 | $html .= '</pre>'; |
||
12 | ob_start(); |
||
13 | echo $html; |
||
14 | ob_flush(); |
||
15 | ob_end_clean(); |
||
16 | if ($die) { |
||
17 | die; |
||
1 ignored issue
–
show
|
|||
18 | } |
||
19 | } |
||
20 | } |
||
62 | } |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.