PHPackages                             zip-fa/posthog-php - 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. zip-fa/posthog-php

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

zip-fa/posthog-php
==================

PostHog PHP Library

02.1k—8.3%PHP

Since Jan 8Pushed 4mo agoCompare

[ Source](https://github.com/zip-fa/posthog-php)[ Packagist](https://packagist.org/packages/zip-fa/posthog-php)[ RSS](/packages/zip-fa-posthog-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

PostHog PHP
===========

[](#posthog-php)

Please see the main [PostHog docs](https://posthog.com/docs).

Specifically, the [PHP integration](https://posthog.com/docs/integrations/php-integration) details.

Features
--------

[](#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
-----------

[](#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?
----------

[](#questions)

### [Join our Slack community.](https://join.slack.com/t/posthogusers/shared_invite/enQtOTY0MzU5NjAwMDY3LTc2MWQ0OTZlNjhkODk3ZDI3NDVjMDE1YjgxY2I4ZjI4MzJhZmVmNjJkN2NmMGJmMzc2N2U3Yjc3ZjI5NGFlZDQ)

[](#join-our-slack-community)

Contributing
------------

[](#contributing)

1. [Download PHP](https://www.php.net/manual/en/install.php) and [Composer](https://getcomposer.org/download/)
2. `php composer.phar update` to install dependencies
3. `bin/test` to run tests (this script calls `./vendor/bin/phpunit --verbose test`)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance52

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 Bus Factor4

4 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/61551308?v=4)[zip-fa](/maintainers/zip-fa)[@zip-fa](https://github.com/zip-fa)

---

Top Contributors

[![EDsCODE](https://avatars.githubusercontent.com/u/13127476?v=4)](https://github.com/EDsCODE "EDsCODE (44 commits)")[![yakkomajuri](https://avatars.githubusercontent.com/u/38760734?v=4)](https://github.com/yakkomajuri "yakkomajuri (25 commits)")[![neilkakkar](https://avatars.githubusercontent.com/u/7115141?v=4)](https://github.com/neilkakkar "neilkakkar (23 commits)")[![joesaunderson](https://avatars.githubusercontent.com/u/11272509?v=4)](https://github.com/joesaunderson "joesaunderson (18 commits)")[![imhmdb](https://avatars.githubusercontent.com/u/34659256?v=4)](https://github.com/imhmdb "imhmdb (16 commits)")[![mariusandra](https://avatars.githubusercontent.com/u/53387?v=4)](https://github.com/mariusandra "mariusandra (15 commits)")[![haacked](https://avatars.githubusercontent.com/u/19977?v=4)](https://github.com/haacked "haacked (11 commits)")[![alexkim205](https://avatars.githubusercontent.com/u/13460330?v=4)](https://github.com/alexkim205 "alexkim205 (11 commits)")[![macobo](https://avatars.githubusercontent.com/u/148820?v=4)](https://github.com/macobo "macobo (10 commits)")[![Twixes](https://avatars.githubusercontent.com/u/4550621?v=4)](https://github.com/Twixes "Twixes (10 commits)")[![dmarticus](https://avatars.githubusercontent.com/u/4853149?v=4)](https://github.com/dmarticus "dmarticus (6 commits)")[![danielbachhuber](https://avatars.githubusercontent.com/u/36432?v=4)](https://github.com/danielbachhuber "danielbachhuber (5 commits)")[![zip-fa](https://avatars.githubusercontent.com/u/61551308?v=4)](https://github.com/zip-fa "zip-fa (3 commits)")[![wundo](https://avatars.githubusercontent.com/u/113942?v=4)](https://github.com/wundo "wundo (3 commits)")[![dustinbyrne](https://avatars.githubusercontent.com/u/8737782?v=4)](https://github.com/dustinbyrne "dustinbyrne (2 commits)")[![andyzzhao](https://avatars.githubusercontent.com/u/34008309?v=4)](https://github.com/andyzzhao "andyzzhao (2 commits)")[![elliottlawson](https://avatars.githubusercontent.com/u/3441829?v=4)](https://github.com/elliottlawson "elliottlawson (1 commits)")[![markharding](https://avatars.githubusercontent.com/u/851436?v=4)](https://github.com/markharding "markharding (1 commits)")[![eexit](https://avatars.githubusercontent.com/u/57098?v=4)](https://github.com/eexit "eexit (1 commits)")[![rafaeelaudibert](https://avatars.githubusercontent.com/u/32079912?v=4)](https://github.com/rafaeelaudibert "rafaeelaudibert (1 commits)")

### Embed Badge

![Health badge](/badges/zip-fa-posthog-php/health.svg)

```
[![Health](https://phpackages.com/badges/zip-fa-posthog-php/health.svg)](https://phpackages.com/packages/zip-fa-posthog-php)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
