Skip to content

rollbar/rollbar-php

Repository files navigation

rollbar-logo

Rollbar PHP SDK

Proactively discover, predict, and resolve errors in real-time withRollbar’serror monitoring platform.Start tracking errors today!

Latest Version on Packagist CI for Rollbar-PHP, master Total Downloads


Key benefits of using Rollbar PHP SDK are:

Quickstart

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 thepost_client_itemvalue 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.

Getting Help

Releases, Versions, and PHP Compatibility

Major releases of this library support major versions of PHP, as follows:

  • For PHP 8, choose the4.xor3.xbranch.
  • For PHP 7, choose a2.xrelease.
  • For PHP 5, choose a1.xrelease.

To obtain a release, download an archive from theReleasespage 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 toCHANGELOG.mdfor a complete history.

License

Rollbar-PHP is free software released under the MIT License. SeeLICENSE for details.