$exception = new Exception; $trace = $exception->getTrace(); $line = $trace[1]['line']; $file = $trace[1]['file'];