Skip to content

Commit

Permalink
chore: PHP SDK example fix (#8146)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus authored Sep 16, 2024
1 parent f76f754 commit 212203f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion frontend/src/component/onboarding/sdkSnippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,14 @@ end`,
use Unleash\\Client\\UnleashBuilder;
require 'vendor/autoload.php';
$unleash = UnleashBuilder::create()
->withAppName('unleash-onboarding-php')
->withAppUrl('<YOUR_API_URL>')
->withHeader('Authorization', '<YOUR_API_TOKEN>')
->withInstanceId('unleash-onboarding-instance')
->withMetricsInterval(5000)
->build();`,
Rust: `let client = client::ClientBuilder::default()
.interval(500)
Expand Down Expand Up @@ -203,7 +206,11 @@ export const checkFlagCodeSnippets: Record<SdkName, string> = {
}, 1000);
`,
Ruby: ``,
PHP: ``,
PHP: `while (true) {
echo 'Feature flag is: ' . $unleash->isEnabled('<YOUR_FLAG>') . PHP_EOL;
sleep(1);
}
`,
Rust: ``,
'.NET': ``,
Java: ``,
Expand Down

0 comments on commit 212203f

Please sign in to comment.