public static function print_r($data, $description = '', $expand_objects = true, $max_depth = -1) { it_classes_load('it-debug.php'); $args = compact('description', 'expand_objects', 'max_depth'); ITDebug::print_r($data, $args); }
public static function backtrace($args = array()) { if (is_string($args)) { $args = array('description' => $args); } else { if (is_bool($args)) { $args = array('expand_objects' => $args); } else { if (is_numeric($args)) { $args = array('max_depth' => $args); } else { if (!is_array($args)) { $args = array(); } } } } $default_args = array('description' => '', 'expand_objects' => false, 'max_depth' => 3, 'type' => ''); $args = array_merge($default_args, $args); if (isset($args['offset'])) { $args['offset']++; } else { $args['offset'] = 1; } $backtrace = ITDebug::get_backtrace($args); if ('string' == $args['type']) { echo $backtrace; } else { $args['max_depth']++; ITDebug::print_r($backtrace, $args); } }