@Immutable
    public static String hex2bin(Memory _s) {
        String s = _s.toBinaryString();
        StringBuilder sb = new StringBuilder();

        int len = s.length();

        for (int i = 0; i + 1 < len; i += 2) {
            int d1 = hexDigit(s.charAt(i));
            int d2 = hexDigit(s.charAt(i + 1));

            int d = d1 * 16 + d2;
            sb.append((char) d);
        }

        return sb.toString();
    }
Parses the cslashes bitmap returning an actual bitmap.

@param charset the bitmap string

@return the actual bitmap
exts/jphp-zend-ext/src/main/java/org/develnext/jphp/zend/ext/standard/StringFunctions.java