1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 08:58:28 +02:00

@- Added session_cache_expire() function. (patch from anuradha@gnu.org)

This commit is contained in:
Andrei Zmievski
2001-10-22 15:18:06 +00:00
parent 43f1b676bb
commit 1beb9b21e5
+24
View File
@@ -67,6 +67,7 @@ function_entry session_functions[] = {
PHP_FE(session_unset, NULL)
PHP_FE(session_set_save_handler, NULL)
PHP_FE(session_cache_limiter, NULL)
PHP_FE(session_cache_expire, NULL)
PHP_FE(session_set_cookie_params, NULL)
PHP_FE(session_get_cookie_params, NULL)
PHP_FE(session_write_close, NULL)
@@ -1174,6 +1175,29 @@ PHP_FUNCTION(session_cache_limiter)
}
/* }}} */
/* {{{ proto int session_cache_expire([int new_cache_expire])
Return the current cache expire. If new_cache_expire is given, the current cache_expire is replaced with new_cache_expire */
PHP_FUNCTION(session_cache_expire)
{
zval **p_cache_expire;
int ac = ZEND_NUM_ARGS();
long old;
PSLS_FETCH();
old = PS(cache_expire);
if (ac < 0 || ac > 1 || zend_get_parameters_ex(ac, &p_cache_expire) == FAILURE)
WRONG_PARAM_COUNT;
if (ac == 1) {
convert_to_long_ex(p_cache_expire);
PS(cache_expire) = Z_LVAL_PP(p_cache_expire);
}
RETVAL_LONG(old);
}
/* }}} */
/* {{{ static void php_register_var(zval** entry TSRMLS_DC) */
static void php_register_var(zval** entry TSRMLS_DC)
{