}
/* }}} */
-/* {{{ proto string nl_langinfo(int item)
+/* {{{ proto string nl_langinfo(int item) U
Query language and locale information */
PHP_FUNCTION(nl_langinfo)
{
- zval **item;
+ long item;
char *value;
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &item) == FAILURE) {
- WRONG_PARAM_COUNT;
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &item) == FAILURE) {
+ return;
}
- convert_to_long_ex(item);
- value = nl_langinfo(Z_LVAL_PP(item));
+ if (UG(unicode)) {
+ php_error_docref(NULL TSRMLS_DC, E_STRICT, "deprecated in Unicode mode, please use ICU locale functions");
+ }
+
+ value = nl_langinfo(item);
if (value == NULL) {
RETURN_FALSE;
} else {
efree(args);
WRONG_PARAM_COUNT;
}
+
+ if (UG(unicode)) {
+ php_error_docref(NULL TSRMLS_DC, E_STRICT, "deprecated in Unicode mode, please use ICU locale functions");
+ }
+
#ifdef HAVE_SETLOCALE
pcategory = args[0];
if (Z_TYPE_PP(pcategory) == IS_LONG) {
}
/* }}} */
-/* {{{ proto array localeconv(void)
+/* {{{ proto array localeconv(void) U
Returns numeric formatting information based on the current locale */
PHP_FUNCTION(localeconv)
{
int len, i;
/* We don't need no stinkin' parameters... */
- if (ZEND_NUM_ARGS() > 0) {
- WRONG_PARAM_COUNT;
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) {
+ return;
+ }
+
+ if (UG(unicode)) {
+ php_error_docref(NULL TSRMLS_DC, E_STRICT, "deprecated in Unicode mode, please use ICU locale functions");
}
MAKE_STD_ZVAL(grouping);
/* }}} */
#if HAVE_STRFMON
-/* {{{ proto string money_format(string format , float value)
+/* {{{ proto string money_format(string format , float value) U
Convert monetary value(s) to string */
PHP_FUNCTION(money_format)
{
}
str[str_len] = 0;
- RETURN_STRINGL(erealloc(str, str_len + 1), str_len, 0);
+ RETURN_RT_STRINGL(erealloc(str, str_len + 1), str_len, 0);
}
/* }}} */
#endif
Figure out if this is something we can use ICU for, internally.
Check with Zeev.
- localeconv()
- Params API, update to use *_rt_* API.
-
- money_format()
- Just IS_UNICODE support with *_rt_* API.
-
- nl_langinfo()
- Params API, otherwise leave alone
-
parse_str()
Params API. How do we deal with encoding of the data?
explode()
implode()
levenshtein()
+ localeconv()
+ money_format()
+ nl_langinfo()
nl2br()
ord()
pathinfo()