PHP code example of nekoos-pood / bitwise-flag

1. Go to this page and download the library: Download nekoos-pood/bitwise-flag 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/ */

    

nekoos-pood / bitwise-flag example snippets


composer 

$flag = E_NOTICE;

BitwiseFlag::set($flags, E_RECOVERABLE_ERROR, true);

# $flag = E_NOTICE | E_RECOVERABLE_ERROR;

$flag = E_ALL;

BitwiseFlag::set($flags, E_NOTICE, false);

# $flag = E_ALL & ~E_NOTICE;

$flag = E_ALL & ~E_NOTICE;

$check1 = BitwiseFlag::match($flags, E_RECOVERABLE_ERROR);
$check2 = BitwiseFlag::match($flags, E_NOTICE);

# $check1 = true;
# $check2 = false;