note 40107 deleted from language.operators.bitwise by cmb
| From: | cmb@php.net | Date: | Sun, 20 Oct 2019 08:48:22 +0000 |
| Subject: | note 40107 deleted from language.operators.bitwise by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212692@lists.php.net to get a copy of this message | ||
Note Submitter: richard-slater.co.uk
----
For those (like me) who are trying to do bit masking with very large numbers, here is a useful
function to do the work for you.
<?php
function isBitSet($bitMask, $bitMap)
{
return (bool) gmp_intval(gmp_div(gmp_and($bitMask, $bitMap),$bitMask));
}
?>