forked from rapid7/hackazon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDebug.php
More file actions
44 lines (39 loc) · 835 Bytes
/
Debug.php
File metadata and controls
44 lines (39 loc) · 835 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
<?php
/**
* Created by IntelliJ IDEA.
* User: Nikolay Chervyakov
* Date: 04.08.2014
* Time: 14:10
*/
namespace App;
/**
* Class Debug. Extended version of PHPixie Debug.
* @package App
*/
class Debug extends \PHPixie\Debug
{
/**
* Dumps beautifully formatted vars.
*/
public static function dump()
{
echo '<pre>';
call_user_func_array('var_dump', func_get_args());
echo '</pre>';
}
/**
* Dumps and finishes the script.
*/
public static function dumpx()
{
call_user_func_array('self::dump', func_get_args());
exit;
}
/**
* Removed exceptions on notices.
*/
public function init()
{
set_error_handler(array($this, 'error_handler'), E_ALL ^ E_NOTICE);
}
}