Proactively discover, predict, and resolve errors in real-time with Rollbar’s error monitoring platform. Start tracking errors today!
If you've never used Rollbar before, sign up for a Rollbar account and follow the simple, three-step tour. In no time, you'll be capturing errors and exceptions thrown in your code.
If you already have a Rollbar account, log in to your Rollbar account.
From the Settings > Project Access Token menu, click Create New Access Token.
Copy the post_client_item
value and paste it into the code below.
require 'vendor/autoload.php'; // composer require rollbar/rollbar
\Rollbar\Rollbar::init([
'access_token' => '***',
'environment' => 'development',
]);
For detailed usage instructions and configuration reference, refer to our PHP SDK docs.
Major releases of this library support major versions of PHP, as follows:
4.x
or 3.x
branch.2.x
release.1.x
release.To obtain a release, download an archive from the Releases page or use composer:
# for PHP 8 compatibility
$ composer require rollbar/rollbar:^4
# or
$ composer require rollbar/rollbar:^3
# for PHP 7 compatibility
$ composer require rollbar/rollbar:^2
# for PHP 5 compatibility
$ composer require rollbar/rollbar:^1
Refer to CHANGELOG.md for a complete history.
Rollbar-PHP is free software released under the MIT License. See LICENSE for details.