gmp_testbit will be very useful for my (over 64-bit) bitmask checking.In the meantime, I think these are the best replacements.Mostly full:<?php(gmp_scan1($a, $index) == $index)?>Mostly empty:<?php(gmp_scan0($a, $index) != $index)?>Still worst-case O(N), though.