-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Ahmed Abbas edited this page Apr 9, 2026
·
4 revisions
The Convert PHP SDK allows developers to integrate A/B testing, feature flags, and personalization into their PHP applications. It manages different user experiences and features based on visitor data and defined rules, while tracking visitor interactions and conversions.
Source Repository: php-sdk
flowchart TD
A0["ConvertSDK / Core"]
A1["Context"]
A2["DataManager"]
A3["RuleManager"]
A4["BucketingManager"]
A5["ApiManager"]
A6["ExperienceManager"]
A7["FeatureManager"]
A8["EventManager"]
A9["SegmentsManager"]
A10["Config / Types"]
A0 -- "Creates" --> A1
A0 -- "Fetches config via" --> A5
A0 -- "Fires events via" --> A8
A1 -- "Runs experiments via" --> A6
A1 -- "Runs features via" --> A7
A1 -- "Accesses data via" --> A2
A1 -- "Evaluates segments via" --> A9
A1 -- "Releases queues via" --> A5
A2 -- "Buckets via" --> A4
A2 -- "Matches rules via" --> A3
A2 -- "Enqueues tracking via" --> A5
A2 -- "Fires events via" --> A8
A2 -- "Uses types from" --> A10
A6 -- "Gets data/buckets via" --> A2
A7 -- "Gets data/buckets via" --> A2
A9 -- "Matches rules via" --> A3
A9 -- "Stores data via" --> A2
A0 -- "Uses" --> A2
The PHP SDK shares the same architecture and bucketing algorithm as the JavaScript SDK, ensuring cross-SDK deterministic variation assignment. However, it is adapted for PHP's request-scoped execution model:
- Synchronous execution — No Promises or async/await. All methods return results immediately.
-
Static factory —
ConvertSDK::create($config)replacesnew ConvertSDK($config). - PSR integration — Uses PSR-3 (logging), PSR-16 (caching and data persistence), and PSR-18 (HTTP client).
-
No timeouts or timers — PHP requests complete in milliseconds; queue flushing uses
register_shutdown_functioninstead ofsetTimeout. - PSR-16 cache as data store — The same cache used for config caching automatically serves as the visitor data store for cross-request persistence.
-
Typed DTOs — Return types use readonly PHP classes (
BucketedVariation,BucketedFeature) and backed enums (FeatureStatus,RuleError).
- How Convert Works
- Architecture Overview
- Data Model Reference
- Quickstart Overview
- Requirements & Constraints
- Quickstart
- Installation
- Initialization
- Configuration Options
- Return Types & DTOs
- Code Examples
- Segments Manager
- Experiences & Variations
- Feature Flags
- Bucketing Algorithm
- Rule Evaluation & Targeting
- Segments
- Data Management
- Event System
- API Communication & Tracking
Copyrights © 2026 All Rights Reserved by Convert Insights, Inc.
Getting Started
PHP SDK
- Quickstart
- Installation
- Initialization
- Configuration
- Return Types & DTOs
- Code Examples
- Segments Manager
Core Concepts
- Experiences & Variations
- Feature Flags
- Bucketing Algorithm
- Rule Evaluation
- Segments
- Data Management
- Event System
- API Communication
How-To Guides
- Running Experiences
- Running Features
- Tracking Conversions
- Visitor Context
- Persistent DataStore
- Troubleshooting
Contributing