zip-fa / posthog-php
PostHog PHP Library
Installs: 1 708
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 26
pkg:composer/zip-fa/posthog-php
Requires
- php: >=8.0
- ext-json: *
Requires (Dev)
- overtrue/phplint: ^3.0
- phpunit/phpunit: ^9.0
- slope-it/clock-mock: ^0.4.0
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2026-01-08 19:30:48 UTC
README
Please see the main PostHog docs.
Specifically, the PHP integration details.
Features
- ✅ Event capture and user identification
- ✅ Feature flag local evaluation
- ✅ Feature flag dependencies (new!) - Create conditional flags based on other flags
- ✅ Multivariate flags and payloads
- ✅ Group analytics
- ✅ Comprehensive test coverage
Quick Start
- Copy
.env.exampleto.envand add your PostHog credentials - Run
php example.phpto see interactive examples of all features
Questions?
Join our Slack community.
Contributing
- Download PHP and Composer
php composer.phar updateto install dependenciesbin/testto run tests (this script calls./vendor/bin/phpunit --verbose test)