Dump a core file with debug information

v1.0.0 2019-01-15 19:27 UTC


Build Status AppVeyor codecov.io StyleCI License Latest Stable Version Total Downloads

Create a core dump file with debug information.


  • PHP >= 7.1

Install with composer

$ composer require michaelhall/coredump

Basic usage


require_once __DIR__ . '/vendor/autoload.php';

use MichaelHall\CoreDump\CoreDump;

// Creates a core dump and add some extra content.
// Superglobals like $_SERVER, $_GET, $_POST etc. are added automatically.
$coreDump = new CoreDump();
$coreDump->add('Foo', 'Bar');

// Outputs the core dump.
echo $coreDump;

// Saves the core dump with an auto-generated file name in the current directory.
// Also returns the file name.

// As above, but saves the core dump in the /tmp-directory.

The core dump file

The core dump file contains human-readable debug information from:

  • An optional Throwable passed to the CoreDump constructor.
  • Optional variables added by the add() method.
  • Superglobals like $_SERVER, $_GET, $_POST etc.