public static boolean ctype_apply(Memory value, Checker checker){
        int c = tryGetChar(value);
        if (c > -1)
            return checker.check((char)c);

        String str = value.toString();
        int len = str.length();
        for(int i = 0; i < len; i++){
            char ch = str.charAt(i);
            if (!checker.check(ch))
                return false;
        }
        return true;
    }
ctype extension
documentation: http://us1.php.net/manual/ru/book.ctype.php

 Notice: supports UNICODE
exts/jphp-zend-ext/src/main/java/org/develnext/jphp/zend/ext/standard/CTypeFunctions.java