src/AlterPHP/Component/ToolBox/BitTools.php
public static function getBitArrayFromInt($int)
   {
      $binstr = (string) decbin($int);
      $binarr = array_reverse(str_split($binstr));
      $bitarr = array_keys($binarr, '1', true);

      return $bitarr;
   }
public static function getBitArrayFromInt($int)
   {
      $binstr = (string) decbin($int);
      $binarr = array_reverse(str_split($binstr));
      $bitarr = array_keys($binarr, '1', true);

      return $bitarr;
   }
public static function getBitArrayFromInt ( $ int ) { $ binstr = ( string ) decbin ( $ int ) ; $ binarr = array_reverse ( str_split ( $ binstr ) ) ; $ bitarr = array_keys ( $ binarr , '1' , true ) ; return $ bitarr ; }
Return an array of active bits in the binary representation of the given integer
@param integer $int
@return array
Return an array of active bits in the binary representation of the given integer