PHP code example of flipt-io / flipt
1. Go to this page and download the library: Download flipt-io/flipt library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
flipt-io / flipt example snippets
use Flipt\Client\FliptClient;
$fliptClient = new FliptClient();
$result = $fliptClient->variant('flag1', ['fizz' => 'buzz'], 'entity');
$fliptClient = new FliptClient();
$fliptClient->withHeaders(['X-Custom-Header' => 'Custom-Value']);
$fliptClient = new FliptClient();
$fliptClient->withHeaders(['X-Flipt-Environment' => 'production']);