HI. I've setup an experiment with a certain config...
# ask-questions
HI. I've setup an experiment with a certain configuration (traffic split, traffic allocation etc.) in the interface, and it gave me this snippet of code to insert
Copy code
$experiment = new Growthbook\Experiment(
  ["Control", "Variation 1"]
$result = $user->experiment($experiment);

echo $result->value; // "Control" or "Variation 1"
The code itself doesn't reflect the configuration I chose (traffic split, traffic allocation). Is there something I should add to this default PHP code? I use interface on growthbook.io with PHP client library installed on my end. Thanks!
Hmm, that definitely used to show traffic split and coverage. The docs for the php library are here: https://docs.growthbook.io/lib/php#experiments For traffic split, you use the
setting and for allocation you use the
I'll look into the code snippet generator and figure out why it's not including that.
Thanks! Maybe it isn't showed under every scenario, I'll try to play around