1. Go to this page and download the library: Download icecave/flip 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/ */
icecave / flip example snippets
use Icecave\Flip\FlagSetTrait;
final class ExampleFlags
{
use FlagSetTrait;
private $foo = true;
private $bar = false;
private $baz = false;
}
function dumpFlags(ExampleFlags $flags)
{
if ($flags->foo) {
echo 'Foo is enabled!';
} else {
echo 'Foo is disabled!';
}
if ($flags->bar) {
echo 'Bar is enabled!';
} else {
echo 'Bar is disabled!';
}
if ($flags->baz) {
echo 'Baz is enabled!';
} else {
echo 'Baz is disabled!';
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.