Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static function vars()
- {
- if (func_num_args() === 0) return;
- $variables = func_get_args();
- $output = array();
- foreach ($variables as $var)
- {
- $backtrace = debug_backtrace();
- $path = $backtrace[0]['file'];
- $exploded_path = explode('\\', $path);
- $filename = end($exploded_path);
- $last_path_segment = prev($exploded_path);
- $line = $backtrace[0]['line'];
- $output[] = Debug::_dump($var, 1024).' ('.$last_path_segment.'/'.$filename.':'.$line.')';
- }
- return '<pre class="debug">'.implode("\n", $output).'</pre>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement