You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to integrate the Experiments feature into our site. I have set up a new experiment at https://app.posthog.com/experiments and it is running.
I am currently using "posthog/posthog-php": "^3.0" and php 8.1.
I have been trying to get PostHog::getFeatureFlag('sell-your-classic-test', 'some distinct id'); to work but it would keep returning null. I tried:
if (PostHog::isFeatureEnabled('sell-your-classic-test', 'some distinct id')) {
// do something here
}
But this always returns false. I then read about Local Evaluation which requires a personal API key. I created one and have added it to PostHog::init but when I do this I get the below error:
array_key_exists(): Argument #2 ($array) must be of type array, null given
Which is found in vendor/posthog/posthog-php/lib/Client.php:356.
I have been trying to integrate the Experiments feature into our site. I have set up a new experiment at https://app.posthog.com/experiments and it is running.
I am currently using
"posthog/posthog-php": "^3.0"
and php8.1
.I have been trying to get
PostHog::getFeatureFlag('sell-your-classic-test', 'some distinct id');
to work but it would keep returningnull
. I tried:But this always returns false. I then read about Local Evaluation which requires a personal API key. I created one and have added it to
PostHog::init
but when I do this I get the below error:Which is found in
vendor/posthog/posthog-php/lib/Client.php:356
.This is the code that I'm running:
I have also tried:
Any help would be helpful.
The text was updated successfully, but these errors were encountered: