1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

chore: PHP SDK example fix (#8146)

This commit is contained in:
Jaanus Sellin 2024-09-16 14:29:03 +03:00 committed by GitHub
parent f76f754eca
commit 212203f7c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)
@ -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: ``,