PHP code example of traderinteractive / filter-bools

1. Go to this page and download the library: Download traderinteractive/filter-bools 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/ */

    

traderinteractive / filter-bools example snippets


$enabled = \TraderInteractive\Filter\Booleans::filter($value, false, ['on'], ['off']);

$answer = \TraderInteractive\Filter\Booleans::convert($value, 'yes', 'no');