Created
June 15, 2012 09:57
-
-
Save stealth35/2935694 to your computer and use it in GitHub Desktop.
PHP get_current_aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static int copy_current_alias_name(zval **ns TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) | |
{ | |
zval *array = va_arg(args, zval *); | |
add_next_index_stringl(array, hash_key->arKey, hash_key->nKeyLength, 1); | |
return ZEND_HASH_APPLY_KEEP; | |
} | |
PHP_FUNCTION(get_current_aliases) | |
{ | |
if (zend_parse_parameters_none() == FAILURE) { | |
return; | |
} | |
array_init(return_value); | |
zend_hash_apply_with_arguments(CG(current_import) TSRMLS_CC, (apply_func_args_t) copy_current_alias_name, 1, return_value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment