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

dev-master 2026-01-08 19:23 UTC

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

  1. Copy .env.example to .env and add your PostHog credentials
  2. Run php example.php to see interactive examples of all features

Questions?

Join our Slack community.

Contributing

  1. Download PHP and Composer
  2. php composer.phar update to install dependencies
  3. bin/test to run tests (this script calls ./vendor/bin/phpunit --verbose test)