Skip to content

Instantly share code, notes, and snippets.

@kitek
Created June 2, 2013 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kitek/5695079 to your computer and use it in GitHub Desktop.
Save kitek/5695079 to your computer and use it in GitHub Desktop.
ZEND_FUNCTION(strcmp)
{
char *s1, *s2;
int s1_len, s2_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &s1, &s1_len, &s2, &s2_len) == FAILURE) {
return;
}
RETURN_LONG(zend_binary_strcmp(s1, s1_len, s2, s2_len));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment