@@ -10,53 +10,12 @@ Specifically, the [PHP integration](https://posthog.com/docs/integrations/php-in
1010## Features
1111
1212- ✅ Event capture and user identification
13- - ✅ Error tracking with manual exception capture
14- - ✅ Opt-in automatic PHP exception, error, and fatal shutdown capture
15- - ✅ Feature flag local evaluation
16- - ✅ ** Feature flag dependencies** (new!) - Create conditional flags based on other flags
17- - ✅ Multivariate flags and payloads
13+ - ✅ Feature flags, including local evaluation, multivariate flags, payloads, and flag dependencies
1814- ✅ Group analytics
15+ - ✅ Error tracking with manual exception capture and opt-in automatic PHP exception, error, and fatal shutdown capture
16+ - ✅ Request context helpers for applying distinct IDs, session IDs, and common properties across a request
1917- ✅ Comprehensive test coverage
2018
21- ## Quick Start
22-
23- 1 . Copy ` .env.example ` to ` .env ` and add your PostHog credentials
24- 2 . Run ` php example.php ` to see interactive examples of all features
25-
26- ## Error Tracking
27-
28- Manual exception capture:
29-
30- ``` php
31- PostHog::captureException($exception, 'user-123', [
32- '$current_url' => 'https://example.com/settings',
33- ]);
34- ```
35-
36- Opt-in automatic capture from the core SDK:
37-
38- ``` php
39- PostHog::init('phc_xxx', [
40- 'error_tracking' => [
41- 'enabled' => true,
42- 'capture_errors' => true,
43- 'excluded_exceptions' => [
44- \InvalidArgumentException::class,
45- ],
46- 'context_provider' => static function (array $payload): array {
47- return [
48- 'distinctId' => $_SESSION['user_id'] ?? null,
49- 'properties' => [
50- '$current_url' => $_SERVER['REQUEST_URI'] ?? null,
51- ],
52- ];
53- },
54- ],
55- ]);
56- ```
57-
58- Auto error tracking is off by default. When enabled, the SDK chains existing exception and error handlers instead of replacing app behavior.
59-
6019## Questions?
6120
6221### [ Join our Slack community.] ( https://join.slack.com/t/posthogusers/shared_invite/enQtOTY0MzU5NjAwMDY3LTc2MWQ0OTZlNjhkODk3ZDI3NDVjMDE1YjgxY2I4ZjI4MzJhZmVmNjJkN2NmMGJmMzc2N2U3Yjc3ZjI5NGFlZDQ )
0 commit comments