- var_dump: documentation ( source)
- bindec: documentation ( source)
- decbin: documentation ( source)
<?php
// disabling when flag was enabled before
var_dump(decbin(bindec('111') ^ bindec('100')));
// disabling when flag was not enabled before
var_dump(decbin(bindec('11') ^ bindec('100')));
// disabling when flag was enabled before
var_dump(decbin(bindec('111') & ~bindec('100')));
// disabling when flag was not enabled before
var_dump(decbin(bindec('11') & ~bindec('100')));