PHP code example of daltcore / php-unleash-client

1. Go to this page and download the library: Download daltcore/php-unleash-client 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/ */

    

daltcore / php-unleash-client example snippets

bash
composer 



try {
    $unleash = new \DALTCORE\Unleash("https://gitlab.com/api/v4/feature_flags/unleash/3", "TokenForUnleash", "ApplicationName");
} catch (MissingParameterException $e) {
    die($e->getMessage());
}

var_dump($unleash->feature('test_feature')->isEnabled());