using Php;

namespace PhpNative {
    public int stripos (string haystack, string needle) {
        return haystack.down ().index_of (needle.down ());
    }

    public int stripos_static (string haystack, string needle, string php_file, int php_line) throws Error {
        return stripos (haystack, needle);
    }

    public zval stripos_zval (zval haystack, zval needle, string php_file, int php_line) throws Error {
        return zval.integer (stripos_static (zval_to_string (haystack), zval_to_string (needle), php_file, php_line));
    }
}
