public static function flags2bitarray($flags, $len = 4)
    {
        $ret = 0;
        foreach ($flags as $v) {
            $ret |= $v;
        }
        return static::i2b($len, $ret);
    }
public static function flags2bitarray($flags, $len = 4)
    {
        $ret = 0;
        foreach ($flags as $v) {
            $ret |= $v;
        }
        return static::i2b($len, $ret);
    }
public static function flags2bitarray ( $ flags , $ len = 4 ) { $ ret = 0 ; foreach ( $ flags as $ v ) { $ ret |= $ v ; } return static :: i2b ( $ len , $ ret ) ; }
Convert array of flags into bit array
@param  array $flags Flags
@param  integer $len Length. Default is 4
@return string
Convert array of flags into bit array