- var_dump: documentation ( source)
- bindec: documentation ( source)
<?php
// Everything you enter here will be executed by our servers. Try it!
$m = bindec('101');
$t = bindec('100');
$r = (($m & $t) == $t) ? true : false;
var_dump($r, $m&$t);
$t2 = bindec('010');
$r = (($m & $t2) == $t2) ? true : false;
var_dump($r,$m&$t2);