3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bitPointer = 2; $length = 1; $mask = (0xff >> (8 - $length)) << (8 - $bitPointer); printf("%08b", $mask);

preferences:
32.77 ms | 402 KiB | 5 Q