Time Travel PHP Library

Travel is a small PHP library by Rachid Laasri that wraps around Carbon PHP to help you travel to a specific point in time and back again in a simple, readable way.

The readme outlines the usage, which is designed to be simple and readable:

Travel::to('November 5, 1955');

// Stop Biff

// Get back to the future
Travel::to('October 26, 1985');

My favorite example is running some time-sensitive code in a closure, and then time goes back to the current date after the closure executes:

Travel::to('-5 minutes', function() {
    // Do something.
});

If you start time traveling, make sure you come back to avoid disrupting the time-space continuum:

Travel::back();

You can learn more about this package, get full installation instructions, and view the source code on GitHub at rashidlaasri/travel.