public static function Handler($file, $line, $code) { $place = pretty_path($file, $line); output($code, "Assertion failed at {$place}"); }
function place() { $places = array(); $first = true; foreach (debug_backtrace() as $trace) { if ($first) { $first = false; continue; } if (empty($trace['file'])) { continue; } $file = substr(str_replace(DIR_ROOT, '', str_replace('\\', '/', $trace['file'])), 1); $places[] = pretty_path($trace['file'], $trace['line']); } return $places; }