[{"data":1,"prerenderedAt":2134},["ShallowReactive",2],{"navigation_docs":3,"-sdks-openfeature-php":348,"-sdks-openfeature-php-surround":2128},[4,10,71,97,258,329],{"title":5,"path":6,"stem":7,"icon":8,"exact":9},"Introduction","\u002F","0.index","i-lucide-book-open",true,{"title":11,"icon":12,"modifiedAt":13,"path":14,"stem":15,"children":16,"page":12},"Getting Started",false,"2026-04-30T19:15:33.000Z","\u002Fgetting-started","1.getting-started",[17,22,27,32,37,42,47,61,66],{"title":18,"path":19,"stem":20,"icon":21},"Quickstart","\u002Fgetting-started\u002Fquickstart","1.getting-started\u002F1.quickstart","i-lucide-fast-forward",{"title":23,"path":24,"stem":25,"icon":26},"Core Concepts","\u002Fgetting-started\u002Fcore-concepts","1.getting-started\u002F2.core-concepts","i-lucide-workflow",{"title":28,"path":29,"stem":30,"icon":31},"Configs Anatomy","\u002Fgetting-started\u002Fconfigs","1.getting-started\u002F3.configs","i-lucide-file-cog",{"title":33,"path":34,"stem":35,"icon":36},"Architecture","\u002Fgetting-started\u002Farchitecture","1.getting-started\u002F4.architecture","i-lucide-layers",{"title":38,"path":39,"stem":40,"icon":41},"JSON Schema Validation","\u002Fgetting-started\u002Fjson-schema-validation","1.getting-started\u002F5.json-schema-validation","i-lucide-braces",{"title":43,"path":44,"stem":45,"icon":46},"Testing Rules","\u002Fgetting-started\u002Ftesting-targeting-rules","1.getting-started\u002F6.testing-targeting-rules","i-lucide-flask-conical",{"title":48,"modifiedAt":49,"icon":50,"defaultOpen":12,"path":51,"stem":52,"children":53},"Experiments","2026-11-10T01:16:18.000Z","i-lucide-flask-round","\u002Fgetting-started\u002Fexperiments","1.getting-started\u002F7.experiments\u002Findex",[54,56],{"title":55,"path":51,"stem":52,"icon":8},"Overview",{"title":57,"path":58,"stem":59,"icon":60},"How results are computed","\u002Fgetting-started\u002Fexperiments\u002Fhow-results-are-computed","1.getting-started\u002F7.experiments\u002F1.how-results-are-computed","i-lucide-sigma",{"title":62,"path":63,"stem":64,"icon":65},"Segments","\u002Fgetting-started\u002Fsegments","1.getting-started\u002F8.segments","i-lucide-squares-intersect",{"title":67,"path":68,"stem":69,"icon":70},"Pricing & Billing","\u002Fgetting-started\u002Fpricing-and-billing","1.getting-started\u002F9.pricing-and-billing","i-lucide-credit-card",{"title":72,"modifiedAt":73,"defaultOpen":9,"path":74,"stem":75,"children":76,"page":12},"Monitoring","2026-09-24T23:33:20.000Z","\u002Fmonitoring","2.monitoring",[77,82,87,92],{"title":78,"path":79,"stem":80,"icon":81},"Activity","\u002Fmonitoring\u002Factivity","2.monitoring\u002F1.activity","i-lucide-activity",{"title":83,"path":84,"stem":85,"icon":86},"Lifecycle","\u002Fmonitoring\u002Flifecycle","2.monitoring\u002F2.lifecycle","i-lucide-recycle",{"title":88,"path":89,"stem":90,"icon":91},"Alerts","\u002Fmonitoring\u002Falerts","2.monitoring\u002F3.alerts","i-lucide-bell",{"title":93,"path":94,"stem":95,"icon":96},"Dynamic Detection","\u002Fmonitoring\u002Fdynamic-detection","2.monitoring\u002F4.dynamic-detection","i-lucide-hat-glasses",{"title":98,"modifiedAt":73,"defaultOpen":9,"path":99,"stem":100,"children":101,"page":12},"SDKs","\u002Fsdks","3.sdks",[102,107,128,153,169,205,253],{"title":103,"path":104,"stem":105,"icon":106},"Available SDKs","\u002Fsdks\u002Favailable-sdks","3.sdks\u002F1.available-sdks","i-lucide-list",{"title":108,"modifiedAt":73,"icon":109,"defaultOpen":12,"path":110,"stem":111,"children":112,"page":12},"Browser SDKs","i-lucide-monitor","\u002Fsdks\u002Fbrowser","3.sdks\u002F2.browser",[113,118,123],{"title":114,"path":115,"stem":116,"icon":117},"Javascript","\u002Fsdks\u002Fbrowser\u002Fjavascript","3.sdks\u002F2.browser\u002F1.javascript","cd-logos-javascript",{"title":119,"path":120,"stem":121,"icon":122},"React","\u002Fsdks\u002Fbrowser\u002Freact","3.sdks\u002F2.browser\u002F2.react","cd-logos-react-light",{"title":124,"path":125,"stem":126,"icon":127},"Vue","\u002Fsdks\u002Fbrowser\u002Fvue","3.sdks\u002F2.browser\u002F3.vue","cd-logos-vue",{"title":129,"modifiedAt":73,"icon":130,"defaultOpen":12,"path":131,"stem":132,"children":133,"page":12},"Mobile SDKs","i-lucide-smartphone","\u002Fsdks\u002Fmobile","3.sdks\u002F3.mobile",[134,138,143,148],{"title":135,"path":136,"stem":137,"icon":122},"React Native","\u002Fsdks\u002Fmobile\u002Freact-native","3.sdks\u002F3.mobile\u002F1.react-native",{"title":139,"path":140,"stem":141,"icon":142},"Flutter","\u002Fsdks\u002Fmobile\u002Fflutter","3.sdks\u002F3.mobile\u002F2.flutter","cd-logos-flutter",{"title":144,"path":145,"stem":146,"icon":147},"Swift","\u002Fsdks\u002Fmobile\u002Fswift","3.sdks\u002F3.mobile\u002F3.swift","cd-logos-swift",{"title":149,"path":150,"stem":151,"icon":152},"Android","\u002Fsdks\u002Fmobile\u002Fandroid","3.sdks\u002F3.mobile\u002F4.android","cd-logos-android",{"title":154,"modifiedAt":73,"icon":155,"defaultOpen":12,"path":156,"stem":157,"children":158,"page":12},"Meta-framework SDKs","i-lucide-monitor-smartphone","\u002Fsdks\u002Fmeta","3.sdks\u002F4.meta",[159,164],{"title":160,"path":161,"stem":162,"icon":163},"Next.js","\u002Fsdks\u002Fmeta\u002Fnextjs","3.sdks\u002F4.meta\u002F1.nextjs","cd-logos-nextjs",{"title":165,"path":166,"stem":167,"icon":168},"Nuxt","\u002Fsdks\u002Fmeta\u002Fnuxt","3.sdks\u002F4.meta\u002F2.nuxt","cd-logos-nuxt",{"title":170,"modifiedAt":73,"icon":171,"defaultOpen":12,"path":172,"stem":173,"children":174,"page":12},"Server SDKs","i-lucide-server","\u002Fsdks\u002Fserver","3.sdks\u002F5.server",[175,180,185,190,195,200],{"title":176,"path":177,"stem":178,"icon":179},"Node.js","\u002Fsdks\u002Fserver\u002Fnode-js","3.sdks\u002F5.server\u002F1.node-js","cd-logos-nodejs",{"title":181,"path":182,"stem":183,"icon":184},"Python","\u002Fsdks\u002Fserver\u002Fpython","3.sdks\u002F5.server\u002F2.python","cd-logos-python",{"title":186,"path":187,"stem":188,"icon":189},"Java","\u002Fsdks\u002Fserver\u002Fjava","3.sdks\u002F5.server\u002F3.java","cd-logos-java",{"title":191,"path":192,"stem":193,"icon":194},".NET","\u002Fsdks\u002Fserver\u002Fdotnet","3.sdks\u002F5.server\u002F4.dotnet","cd-logos-dotnet",{"title":196,"path":197,"stem":198,"icon":199},"Go","\u002Fsdks\u002Fserver\u002Fgo","3.sdks\u002F5.server\u002F5.go","cd-logos-go",{"title":201,"path":202,"stem":203,"icon":204},"PHP","\u002Fsdks\u002Fserver\u002Fphp","3.sdks\u002F5.server\u002F6.php","cd-logos-php",{"title":206,"modifiedAt":73,"icon":207,"defaultOpen":12,"path":208,"stem":209,"children":210},"OpenFeature Providers","cd-logos-openfeature","\u002Fsdks\u002Fopenfeature","3.sdks\u002F6.openfeature\u002Findex",[211,212,217,221,225,229,233,237,241,245,249],{"title":55,"path":208,"stem":209,"icon":207},{"title":213,"path":214,"stem":215,"icon":207,"icons":216},"Web","\u002Fsdks\u002Fopenfeature\u002Fweb","3.sdks\u002F6.openfeature\u002F1.web",[207,117],{"title":144,"path":218,"stem":219,"icon":207,"icons":220},"\u002Fsdks\u002Fopenfeature\u002Fswift","3.sdks\u002F6.openfeature\u002F2.swift",[207,147],{"title":149,"path":222,"stem":223,"icon":207,"icons":224},"\u002Fsdks\u002Fopenfeature\u002Fandroid","3.sdks\u002F6.openfeature\u002F3.android",[207,152],{"title":139,"path":226,"stem":227,"icon":207,"icons":228},"\u002Fsdks\u002Fopenfeature\u002Fflutter","3.sdks\u002F6.openfeature\u002F4.flutter",[207,142],{"title":176,"path":230,"stem":231,"icon":207,"icons":232},"\u002Fsdks\u002Fopenfeature\u002Fnode-js","3.sdks\u002F6.openfeature\u002F5.node-js",[207,179],{"title":181,"path":234,"stem":235,"icon":207,"icons":236},"\u002Fsdks\u002Fopenfeature\u002Fpython","3.sdks\u002F6.openfeature\u002F6.python",[207,184],{"title":186,"path":238,"stem":239,"icon":207,"icons":240},"\u002Fsdks\u002Fopenfeature\u002Fjava","3.sdks\u002F6.openfeature\u002F7.java",[207,189],{"title":191,"path":242,"stem":243,"icon":207,"icons":244},"\u002Fsdks\u002Fopenfeature\u002Fdotnet","3.sdks\u002F6.openfeature\u002F8.dotnet",[207,194],{"title":196,"path":246,"stem":247,"icon":207,"icons":248},"\u002Fsdks\u002Fopenfeature\u002Fgo","3.sdks\u002F6.openfeature\u002F9.go",[207,199],{"title":201,"path":250,"stem":251,"icon":207,"icons":252},"\u002Fsdks\u002Fopenfeature\u002Fphp","3.sdks\u002F6.openfeature\u002F90.php",[207,204],{"title":254,"path":255,"stem":256,"icon":257},"Maven Repository","\u002Fsdks\u002Fmaven-repository","3.sdks\u002F7.maven-repository","i-lucide-package",{"title":259,"modifiedAt":73,"defaultOpen":9,"path":260,"stem":261,"children":262,"page":12},"Integrations","\u002Fintegrations","4.integrations",[263,268,273,278,283,287,292],{"title":264,"path":265,"stem":266,"icon":267},"MCP","\u002Fintegrations\u002Fmcp","4.integrations\u002F1.mcp","cd-logos-mcp",{"title":269,"path":270,"stem":271,"icon":272},"Agent Skills","\u002Fintegrations\u002Fagents","4.integrations\u002F2.agents","i-lucide-bot",{"title":274,"path":275,"stem":276,"icon":277},"CLI","\u002Fintegrations\u002Fcli","4.integrations\u002F3.cli","cd-logos-cli",{"title":279,"path":280,"stem":281,"icon":282},"Terraform","\u002Fintegrations\u002Fterraform","4.integrations\u002F4.terraform","cd-logos-terraform",{"title":284,"path":285,"stem":286,"icon":41},"Admin API","\u002Fintegrations\u002Fadmin-api","4.integrations\u002F5.admin-api",{"title":288,"path":289,"stem":290,"icon":291},"Webhooks","\u002Fintegrations\u002Fwebhooks","4.integrations\u002F6.webhooks","i-lucide-webhook",{"title":293,"modifiedAt":294,"icon":295,"defaultOpen":12,"path":296,"stem":297,"children":298},"Analytics","2026-11-08T17:10:01.000Z","i-lucide-chart-line","\u002Fintegrations\u002Fanalytics","4.integrations\u002F7.analytics\u002Findex",[299,301,305,309,313,317,321,325],{"title":55,"path":296,"stem":297,"icon":300},"i-lucide-blocks",{"title":302,"path":303,"stem":304,"icon":295},"Amplitude","\u002Fintegrations\u002Fanalytics\u002Famplitude","4.integrations\u002F7.analytics\u002F1.amplitude",{"title":306,"path":307,"stem":308,"icon":295},"Datadog","\u002Fintegrations\u002Fanalytics\u002Fdatadog","4.integrations\u002F7.analytics\u002F2.datadog",{"title":310,"path":311,"stem":312,"icon":295},"Google Analytics 4","\u002Fintegrations\u002Fanalytics\u002Fga4","4.integrations\u002F7.analytics\u002F3.ga4",{"title":314,"path":315,"stem":316,"icon":295},"Grafana","\u002Fintegrations\u002Fanalytics\u002Fgrafana","4.integrations\u002F7.analytics\u002F4.grafana",{"title":318,"path":319,"stem":320,"icon":295},"Mixpanel","\u002Fintegrations\u002Fanalytics\u002Fmixpanel","4.integrations\u002F7.analytics\u002F5.mixpanel",{"title":322,"path":323,"stem":324,"icon":295},"PostHog","\u002Fintegrations\u002Fanalytics\u002Fposthog","4.integrations\u002F7.analytics\u002F6.posthog",{"title":326,"path":327,"stem":328,"icon":295},"Segment","\u002Fintegrations\u002Fanalytics\u002Fsegment","4.integrations\u002F7.analytics\u002F7.segment",{"title":330,"modifiedAt":331,"defaultOpen":9,"path":332,"stem":333,"children":334,"page":12},"Migration Guides","2026-10-16T17:57:49.000Z","\u002Fmigration-guides","5.migration-guides",[335,340,344],{"title":336,"path":337,"stem":338,"icon":339},"From LaunchDarkly","\u002Fmigration-guides\u002Flaunchdarkly","5.migration-guides\u002F1.launchdarkly","i-lucide-baggage-claim",{"title":341,"path":342,"stem":343,"icon":339},"From Firebase Remote Config","\u002Fmigration-guides\u002Ffirebase-remote-config","5.migration-guides\u002F2.firebase-remote-config",{"title":345,"path":346,"stem":347,"icon":339},"From Firebase A\u002FB Testing","\u002Fmigration-guides\u002Ffirebase-ab-testing","5.migration-guides\u002F3.firebase-ab-testing",{"id":349,"title":350,"body":351,"description":2119,"extension":2120,"links":2121,"meta":2122,"navigation":2124,"path":250,"seo":2126,"stem":251,"__hash__":2127},"docs\u002F3.sdks\u002F6.openfeature\u002F90.php.md","OpenFeature PHP Provider",{"type":352,"value":353,"toc":2104},"minimark",[354,358,364,368,385,398,406,413,417,423,430,458,465,469,486,641,645,654,659,675,682,686,693,700,794,837,861,869,873,881,885,888,891,953,956,1017,1022,1072,1079,1083,1090,1200,1210,1221,1319,1334,1338,1341,1480,1487,1596,1613,1616,1691,1709,1721,1726,1730,1733,1800,1804,1807,2097,2100],[355,356],"div",{"hidden":9,"dataTitleIcon":357},"openfeature-php",[359,360],"external-badges",{"package-url":361,"registry":362,"repo":363},"https:\u002F\u002Fpackagist.org\u002Fpackages\u002Fconfigdirector\u002Fopenfeature-server-provider","packagist","php-sdks\u002Ftree\u002Fmain\u002Fpackages\u002Fopenfeature-server-provider",[365,366,5],"h2",{"id":367},"introduction",[369,370,371,372,380,381,384],"p",{},"The OpenFeature PHP Provider is intended to be used in combination with the ",[373,374,379],"a",{"href":375,"rel":376,"target":378},"https:\u002F\u002Fopenfeature.dev\u002Fdocs\u002Freference\u002Fsdks\u002Fserver\u002Fphp\u002F",[377],"noopener","_blank","OpenFeature PHP SDK",". The provider wraps the ConfigDirector ",[373,382,383],{"href":202},"PHP SDK",".",[369,386,387,388,392,393,397],{},"The provider receives its values the way the PHP SDK does: from a ",[389,390,391],"strong",{},"local store"," that the PHP processes of a host share, with one request per polling interval asking ConfigDirector for new ones for the whole host, or from the optional streaming process. The PHP SDK's ",[373,394,396],{"href":395},"\u002Fsdks\u002Fserver\u002Fphp#how-the-sdk-connects","How the SDK connects"," explains both. Evaluations read the values the provider already holds, so they make no network call.",[369,399,400,401,405],{},"The minimum PHP version supported is ",[402,403,404],"code",{},"8.3",", on a 64-bit PHP.",[369,407,408,409,384],{},"The OpenFeature PHP SDK has no provider events, no tracking, no initialization step and no shutdown yet, so this provider ",[373,410,412],{"href":411},"#what-the-provider-leaves-out","leaves those out",[365,414,416],{"id":415},"installation","Installation",[369,418,419,420],{},"The provider can be installed with Composer. Its package page is on Packagist: ",[373,421,361],{"href":361,"rel":422,"target":378},[377],[369,424,425,426,429],{},"The OpenFeature PHP SDK (",[402,427,428],{},"open-feature\u002Fsdk",") and the ConfigDirector PHP SDK are included as dependencies.",[431,432,433],"code-group",{},[434,435,441],"pre",{"className":436,"code":437,"filename":438,"language":439,"meta":440,"style":440},"language-bash shiki shiki-themes github-light-high-contrast github-light github-dark","composer require configdirector\u002Fopenfeature-server-provider\n","composer","bash","",[402,442,443],{"__ignoreMap":440},[444,445,448,451,455],"span",{"class":446,"line":447},"line",1,[444,449,438],{"class":450},"sA9AF",[444,452,454],{"class":453},"suztq"," require",[444,456,457],{"class":453}," configdirector\u002Fopenfeature-server-provider\n",[369,459,460,461,464],{},"Like the SDK, the provider needs the curl and JSON extensions, and Composer refuses to install it on a 32-bit PHP. Run it on a PHP release with the fixes for CVE-2026-109618 and CVE-2026-109619: 8.3.36, 8.4.27, 8.5.12 or later. Composer also installs it on an earlier 8.3, 8.4 or 8.5 release, which ConfigDirector does not test. Composer never installs version 1.8.0 of ",[402,462,463],{},"myclabs\u002Fphp-enum"," beside the provider, because that version makes PHP report a deprecation.",[365,466,468],{"id":467},"configure-and-initialize-the-client","Configure and initialize the client",[470,471,472,480,483],"ol",{},[473,474,475,476,479],"li",{},"Create an instance of the provider using your server SDK key. You can retrieve a server SDK key for each environment under ",[402,477,478],{},"SDK keys"," in the dashboard's navigation panel. Creating the provider reads its values.",[473,481,482],{},"Set the OpenFeature provider.",[473,484,485],{},"Get a client instance from OpenFeature.",[434,487,492],{"className":488,"code":489,"filename":490,"language":491,"meta":440,"style":440},"language-php shiki shiki-themes github-light-high-contrast github-light github-dark","use ConfigDirector\\OpenFeature\\ConfigDirectorProvider;\nuse OpenFeature\\OpenFeatureAPI;\n\n\u002F\u002F IMPORTANT: Do not commit the server SDK key to your source code, it is a secret value.\n\u002F\u002F Creating the provider reads the values kept on this host. Only when there are none yet,\n\u002F\u002F as on the first request of a new host or container, does it ask ConfigDirector and wait\n\u002F\u002F up to the connection timeout.\n$api = OpenFeatureAPI::getInstance();\n$api->setProvider(new ConfigDirectorProvider(serverSdkKey: 'YOUR-SERVER-SDK-KEY'));\n\n$client = $api->getClient('my-app', '1.0.0');\n","index.php","php",[402,493,494,508,518,524,531,537,543,549,571,606,611],{"__ignoreMap":440},[444,495,496,500,504],{"class":446,"line":447},[444,497,499],{"class":498},"sLDKn","use",[444,501,503],{"class":502},"sxMNI"," ConfigDirector\\OpenFeature\\ConfigDirectorProvider",[444,505,507],{"class":506},"sbRM4",";\n",[444,509,511,513,516],{"class":446,"line":510},2,[444,512,499],{"class":498},[444,514,515],{"class":502}," OpenFeature\\OpenFeatureAPI",[444,517,507],{"class":506},[444,519,521],{"class":446,"line":520},3,[444,522,523],{"emptyLinePlaceholder":9},"\n",[444,525,527],{"class":446,"line":526},4,[444,528,530],{"class":529},"sM45V","\u002F\u002F IMPORTANT: Do not commit the server SDK key to your source code, it is a secret value.\n",[444,532,534],{"class":446,"line":533},5,[444,535,536],{"class":529},"\u002F\u002F Creating the provider reads the values kept on this host. Only when there are none yet,\n",[444,538,540],{"class":446,"line":539},6,[444,541,542],{"class":529},"\u002F\u002F as on the first request of a new host or container, does it ask ConfigDirector and wait\n",[444,544,546],{"class":446,"line":545},7,[444,547,548],{"class":529},"\u002F\u002F up to the connection timeout.\n",[444,550,552,555,558,561,564,568],{"class":446,"line":551},8,[444,553,554],{"class":506},"$api ",[444,556,557],{"class":498},"=",[444,559,560],{"class":502}," OpenFeatureAPI",[444,562,563],{"class":498},"::",[444,565,567],{"class":566},"sEIia","getInstance",[444,569,570],{"class":506},"();\n",[444,572,574,577,580,583,586,589,592,594,597,600,603],{"class":446,"line":573},9,[444,575,576],{"class":506},"$api",[444,578,579],{"class":498},"->",[444,581,582],{"class":566},"setProvider",[444,584,585],{"class":506},"(",[444,587,588],{"class":498},"new",[444,590,591],{"class":502}," ConfigDirectorProvider",[444,593,585],{"class":506},[444,595,596],{"class":450},"serverSdkKey",[444,598,599],{"class":506},": ",[444,601,602],{"class":453},"'YOUR-SERVER-SDK-KEY'",[444,604,605],{"class":506},"));\n",[444,607,609],{"class":446,"line":608},10,[444,610,523],{"emptyLinePlaceholder":9},[444,612,614,617,619,622,624,627,629,632,635,638],{"class":446,"line":613},11,[444,615,616],{"class":506},"$client ",[444,618,557],{"class":498},[444,620,621],{"class":506}," $api",[444,623,579],{"class":498},[444,625,626],{"class":566},"getClient",[444,628,585],{"class":506},[444,630,631],{"class":453},"'my-app'",[444,633,634],{"class":506},", ",[444,636,637],{"class":453},"'1.0.0'",[444,639,640],{"class":506},");\n",[642,643,644],"warning",{},"Server SDK keys are secret values. Do not commit them to your source code repository. Provide them at runtime via environment variables instead.",[369,646,647,648,653],{},"Create and set the provider once per request, for example in your framework's container, as the ",[373,649,652],{"href":650,"rel":651,"target":378},"https:\u002F\u002Fgithub.com\u002FConfigDirector\u002Fphp-sdks\u002Ftree\u002Fmain\u002Fsamples\u002Fopenfeature-server-provider\u002Fslim",[377],"OpenFeature Slim sample"," does.",[655,656,658],"h3",{"id":657},"when-no-values-arrive-in-time","When no values arrive in time",[369,660,661,662,668,669,384],{},"Creating the provider reads the values kept in the host's local store, as the PHP SDK's ",[373,663,665],{"href":664},"\u002Fsdks\u002Fserver\u002Fphp#configure-and-initialize-the-client",[402,666,667],{},"initialize()"," does. When the local store holds none yet, as on the first request of a new host or container, it asks ConfigDirector and waits up to the connection timeout, which is 3 seconds unless you set the connection's ",[373,670,672],{"href":671},"\u002Fsdks\u002Fserver\u002Fphp#connection",[402,673,674],{},"timeout",[369,676,677,678,681],{},"When no values arrive in time, or ConfigDirector rejects the server SDK key, the constructor does not throw: flags resolve to their in-code default values with the ",[402,679,680],{},"PROVIDER_NOT_READY"," error code, and the SDK logs why. The OpenFeature PHP SDK has no initialization step that a provider could fail, so unlike the other ConfigDirector server providers, this one does not report an error status, and your application keeps serving on in-code default values.",[655,683,685],{"id":684},"additional-configuration-options","Additional configuration options",[369,687,688,689,692],{},"The provider takes the named arguments of the PHP SDK's ",[402,690,691],{},"ConfigDirector::createClient",", so every option of the SDK is available on the provider.",[369,694,695,696,699],{},"For example, the ",[402,697,698],{},"metadata"," can be provided like this:",[434,701,703],{"className":488,"code":702,"filename":490,"language":491,"meta":440,"style":440},"use ConfigDirector\\Metadata;\nuse ConfigDirector\\OpenFeature\\ConfigDirectorProvider;\n\n$api->setProvider(new ConfigDirectorProvider(\n    serverSdkKey: 'YOUR-SERVER-SDK-KEY',\n    metadata: new Metadata(appName: 'YOUR-APP-NAME', appVersion: '1.0.2'),\n));\n",[402,704,705,714,722,726,743,755,790],{"__ignoreMap":440},[444,706,707,709,712],{"class":446,"line":447},[444,708,499],{"class":498},[444,710,711],{"class":502}," ConfigDirector\\Metadata",[444,713,507],{"class":506},[444,715,716,718,720],{"class":446,"line":510},[444,717,499],{"class":498},[444,719,503],{"class":502},[444,721,507],{"class":506},[444,723,724],{"class":446,"line":520},[444,725,523],{"emptyLinePlaceholder":9},[444,727,728,730,732,734,736,738,740],{"class":446,"line":526},[444,729,576],{"class":506},[444,731,579],{"class":498},[444,733,582],{"class":566},[444,735,585],{"class":506},[444,737,588],{"class":498},[444,739,591],{"class":502},[444,741,742],{"class":506},"(\n",[444,744,745,748,750,752],{"class":446,"line":533},[444,746,747],{"class":450},"    serverSdkKey",[444,749,599],{"class":506},[444,751,602],{"class":453},[444,753,754],{"class":506},",\n",[444,756,757,760,762,764,767,769,772,774,777,779,782,784,787],{"class":446,"line":539},[444,758,759],{"class":450},"    metadata",[444,761,599],{"class":506},[444,763,588],{"class":498},[444,765,766],{"class":502}," Metadata",[444,768,585],{"class":506},[444,770,771],{"class":450},"appName",[444,773,599],{"class":506},[444,775,776],{"class":453},"'YOUR-APP-NAME'",[444,778,634],{"class":506},[444,780,781],{"class":450},"appVersion",[444,783,599],{"class":506},[444,785,786],{"class":453},"'1.0.2'",[444,788,789],{"class":506},"),\n",[444,791,792],{"class":446,"line":545},[444,793,605],{"class":506},[369,795,796,797,634,799,634,801,634,804,634,807,634,810,813,814,817,818,822,823,826,827,830,831,834,835,384],{},"The provider accepts the same ",[402,798,596],{},[402,800,698],{},[402,802,803],{},"connection",[402,805,806],{},"logger",[402,808,809],{},"logLevel",[402,811,812],{},"telemetry"," and ",[402,815,816],{},"hooks"," arguments as the PHP SDK client, ",[373,819,821],{"href":820},"\u002Fsdks\u002Fserver\u002Fphp#additional-configuration-options","refer to the additional configuration options section of the PHP SDK for a full list",". Its constructor throws ",[402,824,825],{},"ConfigDirectorValidationException"," for the settings ",[402,828,829],{},"createClient"," rejects, such as a missing key. OpenFeature's ",[402,832,833],{},"setLogger()"," changes nothing here: give your logger as ",[402,836,806],{},[369,838,839,840,844,845,848,849,852,853,856,857,860],{},"That includes ",[373,841,843],{"href":842},"\u002Fsdks\u002Fserver\u002Fphp#run-without-a-connection","running without a connection",": created with the connection ",[402,846,847],{},"mode"," set to ",[402,850,851],{},"ConnectionMode::Offline"," and no server SDK key, the provider serves the values you give it without connecting to ConfigDirector, and its constructor throws ",[402,854,855],{},"ConfigDirectorInitializationException"," when the values of ",[402,858,859],{},"file"," cannot be loaded.",[369,862,863,864,868],{},"The provider works with the ",[373,865,867],{"href":866},"\u002Fsdks\u002Fserver\u002Fphp#the-streaming-process","streaming process"," as the SDK does: the streaming process keeps the host's local store up to date, and the provider reads from it.",[655,870,872],{"id":871},"shut-down","Shut down",[369,874,875,876,880],{},"The OpenFeature PHP SDK has no shutdown. The provider's client is disposed of when the script ends, or as soon as nothing refers to the provider any longer, and then does what the PHP SDK does ",[373,877,879],{"href":878},"\u002Fsdks\u002Fserver\u002Fphp#at-the-end-of-a-request","at the end of a request",": it adds its telemetry to the local store and, when they are due, asks ConfigDirector for new values and sends the host's telemetry report.",[365,882,884],{"id":883},"retrieve-config-values","Retrieve config values",[369,886,887],{},"To retrieve config values, use the OpenFeature client:",[369,889,890],{},"Every getter takes the flag key, the in-code default value and, optionally, the evaluation context:",[434,892,894],{"className":488,"code":893,"filename":490,"language":491,"meta":440,"style":440},"$booleanValue = $client->getBooleanValue('my-config-key', false);\n\n$stringValue = $client->getStringValue('my-string-config-key', 'Default');\n",[402,895,896,923,927],{"__ignoreMap":440},[444,897,898,901,903,906,908,911,913,916,918,921],{"class":446,"line":447},[444,899,900],{"class":506},"$booleanValue ",[444,902,557],{"class":498},[444,904,905],{"class":506}," $client",[444,907,579],{"class":498},[444,909,910],{"class":566},"getBooleanValue",[444,912,585],{"class":506},[444,914,915],{"class":453},"'my-config-key'",[444,917,634],{"class":506},[444,919,920],{"class":502},"false",[444,922,640],{"class":506},[444,924,925],{"class":446,"line":510},[444,926,523],{"emptyLinePlaceholder":9},[444,928,929,932,934,936,938,941,943,946,948,951],{"class":446,"line":520},[444,930,931],{"class":506},"$stringValue ",[444,933,557],{"class":498},[444,935,905],{"class":506},[444,937,579],{"class":498},[444,939,940],{"class":566},"getStringValue",[444,942,585],{"class":506},[444,944,945],{"class":453},"'my-string-config-key'",[444,947,634],{"class":506},[444,949,950],{"class":453},"'Default'",[444,952,640],{"class":506},[369,954,955],{},"Each OpenFeature getter maps to a ConfigDirector config type:",[957,958,959,972],"table",{},[960,961,962],"thead",{},[963,964,965,969],"tr",{},[966,967,968],"th",{},"OpenFeature getter",[966,970,971],{},"ConfigDirector config value",[973,974,975,985,994,1007],"tbody",{},[963,976,977,982],{},[978,979,980],"td",{},[402,981,910],{},[978,983,984],{},"Boolean",[963,986,987,991],{},[978,988,989],{},[402,990,940],{},[978,992,993],{},"String, enum or URL",[963,995,996,1004],{},[978,997,998,634,1001],{},[402,999,1000],{},"getIntegerValue",[402,1002,1003],{},"getFloatValue",[978,1005,1006],{},"Number",[963,1008,1009,1014],{},[978,1010,1011],{},[402,1012,1013],{},"getObjectValue",[978,1015,1016],{},"JSON object or JSON array",[369,1018,1019,1021],{},[402,1020,1013],{}," takes an array as its in-code default value and returns the JSON document as PHP decodes it into an array: a JSON object is an associative array, and a JSON array a list:",[434,1023,1025],{"className":488,"code":1024,"filename":490,"language":491,"meta":440,"style":440},"$settings = $client->getObjectValue('my-json-config-key', []);\n$theme = $settings['theme'] ?? 'light';\n",[402,1026,1027,1048],{"__ignoreMap":440},[444,1028,1029,1032,1034,1036,1038,1040,1042,1045],{"class":446,"line":447},[444,1030,1031],{"class":506},"$settings ",[444,1033,557],{"class":498},[444,1035,905],{"class":506},[444,1037,579],{"class":498},[444,1039,1013],{"class":566},[444,1041,585],{"class":506},[444,1043,1044],{"class":453},"'my-json-config-key'",[444,1046,1047],{"class":506},", []);\n",[444,1049,1050,1053,1055,1058,1061,1064,1067,1070],{"class":446,"line":510},[444,1051,1052],{"class":506},"$theme ",[444,1054,557],{"class":498},[444,1056,1057],{"class":506}," $settings[",[444,1059,1060],{"class":453},"'theme'",[444,1062,1063],{"class":506},"] ",[444,1065,1066],{"class":498},"??",[444,1068,1069],{"class":453}," 'light'",[444,1071,507],{"class":506},[369,1073,1074,1075,384],{},"For additional information regarding the OpenFeature client ",[373,1076,1078],{"href":375,"rel":1077,"target":378},[377],"refer to the OpenFeature PHP SDK documentation",[655,1080,1082],{"id":1081},"evaluation-details","Evaluation details",[369,1084,1085,1086,1089],{},"The detailed getters of the OpenFeature client, such as ",[402,1087,1088],{},"getBooleanDetails",", report why an evaluation produced the value that it did:",[957,1091,1092,1108],{},[960,1093,1094],{},[963,1095,1096,1099,1102,1105],{},[966,1097,1098],{},"Outcome",[966,1100,1101],{},"Reason",[966,1103,1104],{},"Error code",[966,1106,1107],{},"Variant",[973,1109,1110,1125,1139,1152,1169,1184],{},[963,1111,1112,1115,1120,1122],{},[978,1113,1114],{},"A value was found",[978,1116,1117],{},[402,1118,1119],{},"TARGETING_MATCH",[978,1121],{},[978,1123,1124],{},"The variation name, or the value ID",[963,1126,1127,1130,1135,1137],{},[978,1128,1129],{},"A percentage rollout was skipped for a context without a targeting key",[978,1131,1132],{},[402,1133,1134],{},"DEFAULT",[978,1136],{},[978,1138,1124],{},[963,1140,1141,1144,1148,1150],{},[978,1142,1143],{},"The config carries no value",[978,1145,1146],{},[402,1147,1134],{},[978,1149],{},[978,1151],{},[963,1153,1154,1157,1162,1167],{},[978,1155,1156],{},"The config key is unknown",[978,1158,1159],{},[402,1160,1161],{},"ERROR",[978,1163,1164],{},[402,1165,1166],{},"FLAG_NOT_FOUND",[978,1168],{},[963,1170,1171,1174,1178,1182],{},[978,1172,1173],{},"No values have arrived yet",[978,1175,1176],{},[402,1177,1161],{},[978,1179,1180],{},[402,1181,680],{},[978,1183],{},[963,1185,1186,1189,1193,1198],{},[978,1187,1188],{},"The value does not match the requested type",[978,1190,1191],{},[402,1192,1161],{},[978,1194,1195],{},[402,1196,1197],{},"TYPE_MISMATCH",[978,1199],{},[369,1201,1202,1203,1205,1206,1209],{},"The ",[402,1204,1107],{}," is the name of the variation served, such as ",[402,1207,1208],{},"treatment",", when the config has variations and that variation has a name. Otherwise it is ConfigDirector's ID for the value served, a stable hash you can send to analytics in place of the value itself; values served in offline mode have none. In the last four cases, the in-code default value is returned.",[369,1211,1212,1213,1216,1217,1220],{},"For the three outcomes with an error code, the OpenFeature PHP SDK runs the ",[402,1214,1215],{},"after"," stage of your hooks and not their ",[402,1218,1219],{},"error"," stage, as it does for any provider that reports an error in the evaluation details.",[434,1222,1224],{"className":488,"code":1223,"filename":490,"language":491,"meta":440,"style":440},"$details = $client->getBooleanDetails('new-checkout', false, $user);\nif ($details->getError() !== null) {\n    error_log('new-checkout fell back to its in-code default value: ' . $details->getError()->getResolutionErrorCode()->getValue());\n}\n",[402,1225,1226,1251,1276,1314],{"__ignoreMap":440},[444,1227,1228,1231,1233,1235,1237,1239,1241,1244,1246,1248],{"class":446,"line":447},[444,1229,1230],{"class":506},"$details ",[444,1232,557],{"class":498},[444,1234,905],{"class":506},[444,1236,579],{"class":498},[444,1238,1088],{"class":566},[444,1240,585],{"class":506},[444,1242,1243],{"class":453},"'new-checkout'",[444,1245,634],{"class":506},[444,1247,920],{"class":502},[444,1249,1250],{"class":506},", $user);\n",[444,1252,1253,1256,1259,1261,1264,1267,1270,1273],{"class":446,"line":510},[444,1254,1255],{"class":498},"if",[444,1257,1258],{"class":506}," ($details",[444,1260,579],{"class":498},[444,1262,1263],{"class":566},"getError",[444,1265,1266],{"class":506},"() ",[444,1268,1269],{"class":498},"!==",[444,1271,1272],{"class":502}," null",[444,1274,1275],{"class":506},") {\n",[444,1277,1278,1281,1283,1286,1289,1292,1294,1296,1299,1301,1304,1306,1308,1311],{"class":446,"line":520},[444,1279,1280],{"class":502},"    error_log",[444,1282,585],{"class":506},[444,1284,1285],{"class":453},"'new-checkout fell back to its in-code default value: '",[444,1287,1288],{"class":498}," .",[444,1290,1291],{"class":506}," $details",[444,1293,579],{"class":498},[444,1295,1263],{"class":566},[444,1297,1298],{"class":506},"()",[444,1300,579],{"class":498},[444,1302,1303],{"class":566},"getResolutionErrorCode",[444,1305,1298],{"class":506},[444,1307,579],{"class":498},[444,1309,1310],{"class":566},"getValue",[444,1312,1313],{"class":506},"());\n",[444,1315,1316],{"class":446,"line":526},[444,1317,1318],{"class":506},"}\n",[369,1320,1321,1322,634,1324,634,1326,634,1328,1330,1331,1333],{},"To report an experiment to an analytics tool, follow the page for ",[373,1323,302],{"href":303},[373,1325,318],{"href":319},[373,1327,310],{"href":311},[373,1329,326],{"href":327}," or ",[373,1332,322],{"href":323},", which names the event that tool reads.",[365,1335,1337],{"id":1336},"context","Context",[369,1339,1340],{},"The context is the third argument of every getter of the OpenFeature client. The OpenFeature PHP provider evaluates targeting rules locally without additional network calls for different contexts.",[434,1342,1344],{"className":488,"code":1343,"filename":490,"language":491,"meta":440,"style":440},"use OpenFeature\\implementation\\flags\\Attributes;\nuse OpenFeature\\implementation\\flags\\EvaluationContext;\n\n$user = new EvaluationContext(\n    '12345', \u002F\u002F In OpenFeature, the targeting key represents the context's identifier\n    new Attributes([\n        'name' => 'Example User',\n        \u002F\u002F Any arbitrary traits which can be referenced in targeting rules\n        'traits' => ['region' => 'North America'],\n    ]),\n);\n\n$booleanValue = $client->getBooleanValue('my-config-key', false, $user);\n",[402,1345,1346,1355,1364,1368,1383,1393,1404,1417,1422,1443,1448,1452,1457],{"__ignoreMap":440},[444,1347,1348,1350,1353],{"class":446,"line":447},[444,1349,499],{"class":498},[444,1351,1352],{"class":502}," OpenFeature\\implementation\\flags\\Attributes",[444,1354,507],{"class":506},[444,1356,1357,1359,1362],{"class":446,"line":510},[444,1358,499],{"class":498},[444,1360,1361],{"class":502}," OpenFeature\\implementation\\flags\\EvaluationContext",[444,1363,507],{"class":506},[444,1365,1366],{"class":446,"line":520},[444,1367,523],{"emptyLinePlaceholder":9},[444,1369,1370,1373,1375,1378,1381],{"class":446,"line":526},[444,1371,1372],{"class":506},"$user ",[444,1374,557],{"class":498},[444,1376,1377],{"class":498}," new",[444,1379,1380],{"class":502}," EvaluationContext",[444,1382,742],{"class":506},[444,1384,1385,1388,1390],{"class":446,"line":533},[444,1386,1387],{"class":453},"    '12345'",[444,1389,634],{"class":506},[444,1391,1392],{"class":529},"\u002F\u002F In OpenFeature, the targeting key represents the context's identifier\n",[444,1394,1395,1398,1401],{"class":446,"line":539},[444,1396,1397],{"class":498},"    new",[444,1399,1400],{"class":502}," Attributes",[444,1402,1403],{"class":506},"([\n",[444,1405,1406,1409,1412,1415],{"class":446,"line":545},[444,1407,1408],{"class":453},"        'name'",[444,1410,1411],{"class":498}," =>",[444,1413,1414],{"class":453}," 'Example User'",[444,1416,754],{"class":506},[444,1418,1419],{"class":446,"line":551},[444,1420,1421],{"class":529},"        \u002F\u002F Any arbitrary traits which can be referenced in targeting rules\n",[444,1423,1424,1427,1429,1432,1435,1437,1440],{"class":446,"line":573},[444,1425,1426],{"class":453},"        'traits'",[444,1428,1411],{"class":498},[444,1430,1431],{"class":506}," [",[444,1433,1434],{"class":453},"'region'",[444,1436,1411],{"class":498},[444,1438,1439],{"class":453}," 'North America'",[444,1441,1442],{"class":506},"],\n",[444,1444,1445],{"class":446,"line":608},[444,1446,1447],{"class":506},"    ]),\n",[444,1449,1450],{"class":446,"line":613},[444,1451,640],{"class":506},[444,1453,1455],{"class":446,"line":1454},12,[444,1456,523],{"emptyLinePlaceholder":9},[444,1458,1460,1462,1464,1466,1468,1470,1472,1474,1476,1478],{"class":446,"line":1459},13,[444,1461,900],{"class":506},[444,1463,557],{"class":498},[444,1465,905],{"class":506},[444,1467,579],{"class":498},[444,1469,910],{"class":566},[444,1471,585],{"class":506},[444,1473,915],{"class":453},[444,1475,634],{"class":506},[444,1477,920],{"class":502},[444,1479,1250],{"class":506},[369,1481,1482,1483,1486],{},"To evaluate flags for an entity other than a user, such as a tenant, set the context kind with a top-level ",[402,1484,1485],{},"kind"," attribute:",[434,1488,1490],{"className":488,"code":1489,"filename":490,"language":491,"meta":440,"style":440},"$tenant = new EvaluationContext(\n    'acme',\n    new Attributes([\n        'kind' => 'tenant',\n        'name' => 'Acme Inc.',\n        'traits' => ['plan' => 'enterprise'],\n    ]),\n);\n\n$booleanValue = $client->getBooleanValue('my-config-key', false, $tenant);\n",[402,1491,1492,1505,1512,1520,1532,1543,1561,1565,1569,1573],{"__ignoreMap":440},[444,1493,1494,1497,1499,1501,1503],{"class":446,"line":447},[444,1495,1496],{"class":506},"$tenant ",[444,1498,557],{"class":498},[444,1500,1377],{"class":498},[444,1502,1380],{"class":502},[444,1504,742],{"class":506},[444,1506,1507,1510],{"class":446,"line":510},[444,1508,1509],{"class":453},"    'acme'",[444,1511,754],{"class":506},[444,1513,1514,1516,1518],{"class":446,"line":520},[444,1515,1397],{"class":498},[444,1517,1400],{"class":502},[444,1519,1403],{"class":506},[444,1521,1522,1525,1527,1530],{"class":446,"line":526},[444,1523,1524],{"class":453},"        'kind'",[444,1526,1411],{"class":498},[444,1528,1529],{"class":453}," 'tenant'",[444,1531,754],{"class":506},[444,1533,1534,1536,1538,1541],{"class":446,"line":533},[444,1535,1408],{"class":453},[444,1537,1411],{"class":498},[444,1539,1540],{"class":453}," 'Acme Inc.'",[444,1542,754],{"class":506},[444,1544,1545,1547,1549,1551,1554,1556,1559],{"class":446,"line":539},[444,1546,1426],{"class":453},[444,1548,1411],{"class":498},[444,1550,1431],{"class":506},[444,1552,1553],{"class":453},"'plan'",[444,1555,1411],{"class":498},[444,1557,1558],{"class":453}," 'enterprise'",[444,1560,1442],{"class":506},[444,1562,1563],{"class":446,"line":545},[444,1564,1447],{"class":506},[444,1566,1567],{"class":446,"line":551},[444,1568,640],{"class":506},[444,1570,1571],{"class":446,"line":573},[444,1572,523],{"emptyLinePlaceholder":9},[444,1574,1575,1577,1579,1581,1583,1585,1587,1589,1591,1593],{"class":446,"line":608},[444,1576,900],{"class":506},[444,1578,557],{"class":498},[444,1580,905],{"class":506},[444,1582,579],{"class":498},[444,1584,910],{"class":566},[444,1586,585],{"class":506},[444,1588,915],{"class":453},[444,1590,634],{"class":506},[444,1592,920],{"class":502},[444,1594,1595],{"class":506},", $tenant);\n",[369,1597,1598,1599,1601,1602,1605,1606,1608,1609,1612],{},"Leaving ",[402,1600,1485],{}," out means ",[402,1603,1604],{},"user",". A ",[402,1607,1485],{}," inside ",[402,1610,1611],{},"traits"," is an ordinary trait, not the context kind. A context kind is 1 to 64 lowercase letters, digits, dashes, or underscores. A context with an invalid context kind is ignored: the SDK logs an error, and flags still resolve successfully, as if no context had been given.",[369,1614,1615],{},"The evaluation context maps onto the ConfigDirector context as follows:",[957,1617,1618,1628],{},[960,1619,1620],{},[963,1621,1622,1625],{},[966,1623,1624],{},"OpenFeature evaluation context",[966,1626,1627],{},"ConfigDirector context",[973,1629,1630,1643,1654,1665,1676],{},[963,1631,1632,1639],{},[978,1633,1634,1635,1638],{},"The targeting key, or otherwise an ",[402,1636,1637],{},"id"," attribute",[978,1640,1641],{},[402,1642,1637],{},[963,1644,1645,1650],{},[978,1646,1647,1648,1638],{},"The top-level ",[402,1649,1485],{},[978,1651,1652],{},[402,1653,1485],{},[963,1655,1656,1661],{},[978,1657,1202,1658,1638],{},[402,1659,1660],{},"name",[978,1662,1663],{},[402,1664,1660],{},[963,1666,1667,1672],{},[978,1668,1202,1669,1671],{},[402,1670,1611],{}," attribute, an array",[978,1673,1674],{},[402,1675,1611],{},[963,1677,1678,1687],{},[978,1679,1202,1680,1683,1684],{},[402,1681,1682],{},"anonymous"," attribute, a ",[402,1685,1686],{},"bool",[978,1688,1689],{},[402,1690,1682],{},[369,1692,1693,1694,1696,1697,1699,1700,1702,1703,1705,1706,1708],{},"Other attributes are not used, so put the traits your targeting rules read inside ",[402,1695,1611],{},". An ",[402,1698,1637],{}," or a ",[402,1701,1660],{}," that is a number, a boolean or a date is read as text. A date is written as ISO 8601 text, inside ",[402,1704,1611],{}," too, so that date conditions can compare it. A ",[402,1707,1485],{}," that is not a string makes the provider ignore the context, as an invalid context kind does, without logging an error.",[369,1710,1711,1712,1714,1715,1717,1718,1720],{},"An evaluation context with neither a targeting key nor an ",[402,1713,1637],{}," attribute skips percentage rollouts: a rollout does not apply to it, and the targeting rules after the rollout are tried, as they are after a conditional rule the context does not match. When none of them applies, the flag resolves to the default targeting rule value with the reason ",[402,1716,1134],{},"; a later rule that applies resolves with ",[402,1719,1119],{},". A rule that serves a single value still applies to it. To keep an anonymous visitor in a rollout, give the context a stable targeting key, such as a session ID.",[369,1722,1074,1723,384],{},[373,1724,1078],{"href":375,"rel":1725,"target":378},[377],[365,1727,1729],{"id":1728},"what-the-provider-leaves-out","What the provider leaves out",[369,1731,1732],{},"The OpenFeature PHP SDK has no provider events, no tracking, no step that initializes a provider and no shutdown yet. So, unlike the other ConfigDirector OpenFeature providers, this one:",[1734,1735,1736,1761,1779,1791],"ul",{},[473,1737,1738,1741,1742,1330,1745,1748,1749,1753,1754,1757,1758,1760],{},[389,1739,1740],{},"Emits no events",", such as ",[402,1743,1744],{},"PROVIDER_READY",[402,1746,1747],{},"PROVIDER_CONFIGURATION_CHANGED",". In a ",[373,1750,1752],{"href":1751},"\u002Fsdks\u002Fserver\u002Fphp#long-running-processes","long-running process",", the ",[402,1755,1756],{},"configsUpdated"," handler of the ",[402,1759,816],{}," argument tells you when values change.",[473,1762,1763,1769,1770,1773,1774,384],{},[389,1764,1765,1766,384],{},"Has no ",[402,1767,1768],{},"track"," To report an event, such as a completed checkout, create a client with the PHP SDK's ",[402,1771,1772],{},"ConfigDirector::createClient(...)"," and the same server SDK key, and call its ",[373,1775,1777],{"href":1776},"\u002Fsdks\u002Fserver\u002Fphp#track-events",[402,1778,1768],{},[473,1780,1781,1784,1785,1787,1788,384],{},[389,1782,1783],{},"Does not fail when no values arrive in time."," Flags resolve with ",[402,1786,680],{}," instead, as described in ",[373,1789,658],{"href":1790},"#when-no-values-arrive-in-time",[473,1792,1793,1796,1797,384],{},[389,1794,1795],{},"Is not shut down."," Its client disposes of itself, as described in ",[373,1798,872],{"href":1799},"#shut-down",[365,1801,1803],{"id":1802},"test-your-code","Test your code",[369,1805,1806],{},"Code that reads flags through OpenFeature is tested by swapping the provider, so it never has to change for a test. The OpenFeature PHP SDK ships no in-memory provider, so in a test, set a ConfigDirector provider in offline mode with the values the test needs. It needs no server SDK key, never connects to ConfigDirector and sends nothing:",[434,1808,1811],{"className":488,"code":1809,"filename":1810,"language":491,"meta":440,"style":440},"use ConfigDirector\\ConnectionMode;\nuse ConfigDirector\\ConnectionOptions;\nuse ConfigDirector\\OpenFeature\\ConfigDirectorProvider;\nuse OpenFeature\\OpenFeatureAPI;\nuse PHPUnit\\Framework\\TestCase;\n\nfinal class CheckoutTest extends TestCase\n{\n    public function testShowsTheNewCheckout(): void\n    {\n        $api = OpenFeatureAPI::getInstance();\n        $api->setProvider(new ConfigDirectorProvider(\n            connection: new ConnectionOptions(mode: ConnectionMode::Offline, values: ['new-checkout' => true, 'max-items' => 20]),\n        ));\n        $client = $api->getClient('checkout-tests', '1.0.0');\n\n        self::assertTrue($client->getBooleanValue('new-checkout', false));\n        self::assertSame(20, $client->getIntegerValue('max-items', 0));\n    }\n}\n","tests\u002FCheckoutTest.php",[402,1812,1813,1822,1831,1839,1847,1856,1860,1878,1883,1902,1907,1922,1939,1993,1999,2024,2029,2055,2086,2092],{"__ignoreMap":440},[444,1814,1815,1817,1820],{"class":446,"line":447},[444,1816,499],{"class":498},[444,1818,1819],{"class":502}," ConfigDirector\\ConnectionMode",[444,1821,507],{"class":506},[444,1823,1824,1826,1829],{"class":446,"line":510},[444,1825,499],{"class":498},[444,1827,1828],{"class":502}," ConfigDirector\\ConnectionOptions",[444,1830,507],{"class":506},[444,1832,1833,1835,1837],{"class":446,"line":520},[444,1834,499],{"class":498},[444,1836,503],{"class":502},[444,1838,507],{"class":506},[444,1840,1841,1843,1845],{"class":446,"line":526},[444,1842,499],{"class":498},[444,1844,515],{"class":502},[444,1846,507],{"class":506},[444,1848,1849,1851,1854],{"class":446,"line":533},[444,1850,499],{"class":498},[444,1852,1853],{"class":502}," PHPUnit\\Framework\\TestCase",[444,1855,507],{"class":506},[444,1857,1858],{"class":446,"line":539},[444,1859,523],{"emptyLinePlaceholder":9},[444,1861,1862,1865,1868,1871,1874],{"class":446,"line":545},[444,1863,1864],{"class":498},"final",[444,1866,1867],{"class":498}," class",[444,1869,1870],{"class":450}," CheckoutTest",[444,1872,1873],{"class":498}," extends",[444,1875,1877],{"class":1876},"sT_Me"," TestCase\n",[444,1879,1880],{"class":446,"line":551},[444,1881,1882],{"class":506},"{\n",[444,1884,1885,1888,1891,1894,1896,1899],{"class":446,"line":573},[444,1886,1887],{"class":498},"    public",[444,1889,1890],{"class":498}," function",[444,1892,1893],{"class":566}," testShowsTheNewCheckout",[444,1895,1298],{"class":506},[444,1897,1898],{"class":498},":",[444,1900,1901],{"class":498}," void\n",[444,1903,1904],{"class":446,"line":608},[444,1905,1906],{"class":506},"    {\n",[444,1908,1909,1912,1914,1916,1918,1920],{"class":446,"line":613},[444,1910,1911],{"class":506},"        $api ",[444,1913,557],{"class":498},[444,1915,560],{"class":502},[444,1917,563],{"class":498},[444,1919,567],{"class":566},[444,1921,570],{"class":506},[444,1923,1924,1927,1929,1931,1933,1935,1937],{"class":446,"line":1454},[444,1925,1926],{"class":506},"        $api",[444,1928,579],{"class":498},[444,1930,582],{"class":566},[444,1932,585],{"class":506},[444,1934,588],{"class":498},[444,1936,591],{"class":502},[444,1938,742],{"class":506},[444,1940,1941,1944,1946,1948,1951,1953,1955,1957,1960,1962,1965,1967,1970,1973,1975,1977,1980,1982,1985,1987,1990],{"class":446,"line":1459},[444,1942,1943],{"class":450},"            connection",[444,1945,599],{"class":506},[444,1947,588],{"class":498},[444,1949,1950],{"class":502}," ConnectionOptions",[444,1952,585],{"class":506},[444,1954,847],{"class":450},[444,1956,599],{"class":506},[444,1958,1959],{"class":502},"ConnectionMode",[444,1961,563],{"class":498},[444,1963,1964],{"class":502},"Offline",[444,1966,634],{"class":506},[444,1968,1969],{"class":450},"values",[444,1971,1972],{"class":506},": [",[444,1974,1243],{"class":453},[444,1976,1411],{"class":498},[444,1978,1979],{"class":502}," true",[444,1981,634],{"class":506},[444,1983,1984],{"class":453},"'max-items'",[444,1986,1411],{"class":498},[444,1988,1989],{"class":502}," 20",[444,1991,1992],{"class":506},"]),\n",[444,1994,1996],{"class":446,"line":1995},14,[444,1997,1998],{"class":506},"        ));\n",[444,2000,2002,2005,2007,2009,2011,2013,2015,2018,2020,2022],{"class":446,"line":2001},15,[444,2003,2004],{"class":506},"        $client ",[444,2006,557],{"class":498},[444,2008,621],{"class":506},[444,2010,579],{"class":498},[444,2012,626],{"class":566},[444,2014,585],{"class":506},[444,2016,2017],{"class":453},"'checkout-tests'",[444,2019,634],{"class":506},[444,2021,637],{"class":453},[444,2023,640],{"class":506},[444,2025,2027],{"class":446,"line":2026},16,[444,2028,523],{"emptyLinePlaceholder":9},[444,2030,2032,2035,2038,2041,2043,2045,2047,2049,2051,2053],{"class":446,"line":2031},17,[444,2033,2034],{"class":498},"        self::",[444,2036,2037],{"class":566},"assertTrue",[444,2039,2040],{"class":506},"($client",[444,2042,579],{"class":498},[444,2044,910],{"class":566},[444,2046,585],{"class":506},[444,2048,1243],{"class":453},[444,2050,634],{"class":506},[444,2052,920],{"class":502},[444,2054,605],{"class":506},[444,2056,2058,2060,2063,2065,2068,2071,2073,2075,2077,2079,2081,2084],{"class":446,"line":2057},18,[444,2059,2034],{"class":498},[444,2061,2062],{"class":566},"assertSame",[444,2064,585],{"class":506},[444,2066,2067],{"class":502},"20",[444,2069,2070],{"class":506},", $client",[444,2072,579],{"class":498},[444,2074,1000],{"class":566},[444,2076,585],{"class":506},[444,2078,1984],{"class":453},[444,2080,634],{"class":506},[444,2082,2083],{"class":502},"0",[444,2085,605],{"class":506},[444,2087,2089],{"class":446,"line":2088},19,[444,2090,2091],{"class":506},"    }\n",[444,2093,2095],{"class":446,"line":2094},20,[444,2096,1318],{"class":506},[369,2098,2099],{},"Every evaluation context receives the same value from an offline provider. To change a value during a test, set a new provider with the new values. The OpenFeature API is one instance for the whole process, so each test sets the provider it needs before it reads. The examples use PHPUnit; any test framework works just as well.",[2101,2102,2103],"style",{},"html pre.shiki code .sA9AF, html code.shiki .sA9AF{--shiki-light:#702C00;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .suztq, html code.shiki .suztq{--shiki-light:#032563;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sLDKn, html code.shiki .sLDKn{--shiki-light:#A0111F;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sxMNI, html code.shiki .sxMNI{--shiki-light:#023B95;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sbRM4, html code.shiki .sbRM4{--shiki-light:#0E1116;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sM45V, html code.shiki .sM45V{--shiki-light:#66707B;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sEIia, html code.shiki .sEIia{--shiki-light:#622CBC;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sT_Me, html code.shiki .sT_Me{--shiki-light:#023B95;--shiki-default:#6F42C1;--shiki-dark:#B392F0}",{"title":440,"searchDepth":510,"depth":510,"links":2105},[2106,2107,2108,2113,2116,2117,2118],{"id":367,"depth":510,"text":5},{"id":415,"depth":510,"text":416},{"id":467,"depth":510,"text":468,"children":2109},[2110,2111,2112],{"id":657,"depth":520,"text":658},{"id":684,"depth":520,"text":685},{"id":871,"depth":520,"text":872},{"id":883,"depth":510,"text":884,"children":2114},[2115],{"id":1081,"depth":520,"text":1082},{"id":1336,"depth":510,"text":1337},{"id":1728,"depth":510,"text":1729},{"id":1802,"depth":510,"text":1803},"ConfigDirector Provider for the OpenFeature PHP SDK","md",null,{"modifiedAt":2123},"2026-11-16T20:40:27.000Z",{"title":201,"icon":207,"icons":2125},[207,204],{"title":350,"description":2119},"YIU6KCsaFO64k1RYcI0j0O1vvrIvL1gWlHLYjXbWbMo",[2129,2132],{"title":196,"path":246,"stem":247,"description":2130,"icon":207,"icons":2131,"children":-1},"ConfigDirector Provider for the OpenFeature Go SDK",[207,199],{"title":254,"path":255,"stem":256,"description":2133,"icon":257,"children":-1},"Add the ConfigDirector Maven repository to a Gradle or Maven build to install the Android and Java SDKs, and verify the files it serves",1794897768742]