From 1e34388ccafc2b4e060dcdfb783851b41c8103ac Mon Sep 17 00:00:00 2001 From: sjaanus Date: Mon, 16 Sep 2024 13:51:07 +0300 Subject: [PATCH] chore: PHP example --- frontend/src/component/onboarding/sdkSnippets.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/onboarding/sdkSnippets.ts b/frontend/src/component/onboarding/sdkSnippets.ts index 4002023c6da2..90984720f92a 100644 --- a/frontend/src/component/onboarding/sdkSnippets.ts +++ b/frontend/src/component/onboarding/sdkSnippets.ts @@ -62,11 +62,14 @@ end`, use Unleash\\Client\\UnleashBuilder; +require 'vendor/autoload.php'; + $unleash = UnleashBuilder::create() ->withAppName('unleash-onboarding-php') ->withAppUrl('') ->withHeader('Authorization', '') ->withInstanceId('unleash-onboarding-instance') + ->withMetricsInterval(5000) ->build();`, Rust: `let client = client::ClientBuilder::default() .interval(500) @@ -203,7 +206,11 @@ export const checkFlagCodeSnippets: Record = { }, 1000); `, Ruby: ``, - PHP: ``, + PHP: `while (true) { + echo 'Feature flag is: ' . $unleash->isEnabled('') . PHP_EOL; + sleep(1); +} +`, Rust: ``, '.NET': ``, Java: ``,