Skip to content

Latest commit

 

History

History
13 lines (12 loc) · 224 Bytes

exception-to-string.md

File metadata and controls

13 lines (12 loc) · 224 Bytes

PHP exception to string

<?php
sprintf(
  "Exception '%s' with message '%s' in %s:%s",
  get_class($exception),
  $exception->getMessage(),
  $exception->getFile(),
  $exception->getLine()
);