posthog/posthog-php

PostHog PHP Library

Maintainers

Package info

github.com/PostHog/posthog-php

pkg:composer/posthog/posthog-php

Statistics

Installs: 4 187 627

Dependents: 8

Suggesters: 1

Stars: 30

Open Issues: 5

4.4.0 2026-05-20 00:54 UTC

This package is auto-updated.

Last update: 2026-05-20 20:44:28 UTC


README

PHP Version CI

Please see the main PostHog docs.

Specifically, the PHP integration details.

Features

  • ✅ Event capture and user identification
  • ✅ Feature flags, including local evaluation, multivariate flags, payloads, and flag dependencies
  • ✅ Group analytics
  • ✅ Error tracking with manual exception capture and opt-in automatic PHP exception, error, and fatal shutdown capture
  • ✅ Request context helpers for applying distinct IDs, session IDs, and common properties across a request
  • ✅ Comprehensive test coverage

Questions?

Join our Slack community.

Contributing

See CONTRIBUTING.md for local setup and test instructions.

Releasing

See RELEASING.md.