Conditions | 4 |
Paths | 6 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
31 | public function debug($stop = true) { |
||
32 | if(array_key_exists('debug_formatter', $this->options)) { |
||
33 | $this->options['debug_formatter'](); |
||
34 | } elseif(PHP_SAPI === 'cli') { |
||
35 | echo "\n{$this->__toString()}\n"; |
||
36 | } else { |
||
37 | echo "<pre>{$this->__toString()}</pre>"; |
||
38 | } |
||
39 | if($stop) { |
||
40 | exit; |
||
|
|||
41 | } |
||
42 | return $this; |
||
43 | } |
||
71 |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.