PHPackages                             convertcom/php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. convertcom/php-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

convertcom/php-sdk
==================

Convert PHP SDK - a PHP version of the Convert Insights SDK

v1.1.0(2w ago)211[2 issues](https://github.com/convertcom/php-sdk/issues)[2 PRs](https://github.com/convertcom/php-sdk/pulls)Apache-2.0PHPPHP ^8.2

Since Apr 27Pushed 2w ago1 watchersCompare

[ Source](https://github.com/convertcom/php-sdk)[ Packagist](https://packagist.org/packages/convertcom/php-sdk)[ RSS](/packages/convertcom-php-sdk/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (16)Versions (7)Used By (0)

Convert PHP SDK
===============

[](#convert-php-sdk)

The official PHP SDK for [Convert Experiences](https://www.convert.com/) — a server-side A/B testing and feature flagging platform.

Bucket visitors into experiment variations, resolve feature flags with typed variables, track goal conversions, and report revenue — all with deterministic, cross-SDK parity with the Convert JavaScript SDK.

Table of Contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Configuration](#configuration)
- [Data Persistence](#data-persistence)
- [Visitor Context](#visitor-context)
- [Experience Bucketing](#experience-bucketing)
- [Feature Flags](#feature-flags)
- [Conversion Tracking](#conversion-tracking)
- [Revenue Reporting](#revenue-reporting)
- [Force Multiple Transactions](#force-multiple-transactions)
- [Flushing Events](#flushing-events)
- [Event System](#event-system)
- [Logging](#logging)
- [Return Types](#return-types)
- [Testing](#testing)
- [License](#license)

Requirements
------------

[](#requirements)

- PHP 8.2, 8.3, or 8.4
- A PSR-18 HTTP client (e.g., `guzzlehttp/guzzle ^7`)
- A [Convert Experiences](https://www.convert.com/) account with an SDK key

The SDK auto-discovers your PSR-18 client via [`php-http/discovery`](https://github.com/php-http/discovery). Install any compliant client — no adapter code needed.

Installation
------------

[](#installation)

```
composer require convertcom/php-sdk
```

This installs the SDK and its external PSR dependencies. The key runtime dependencies are:

- `psr/log ^3.0` (PSR-3 logging interface)
- `psr/simple-cache ^3.0` (PSR-16 caching interface)
- `php-http/discovery ^1.19` (auto-discovers your HTTP client)

Quick Start
-----------

[](#quick-start)

```
