summaryrefslogtreecommitdiff
path: root/main/php_variables.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-10-24 17:41:13 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-10-24 17:41:13 +0000
commit0802b1286dba164a01683fc585f89a8092381a2f (patch)
treedc0aac85bff181d67a443d06eaa17af865396bd5 /main/php_variables.c
parentaeac86458c558fb4c0f3611aa5268530f983abfc (diff)
downloadphp-git-0802b1286dba164a01683fc585f89a8092381a2f.tar.gz
Make request start time be available via $_SERVER['REQUEST_TIME'].
# As discussed on internals.
Diffstat (limited to 'main/php_variables.c')
-rw-r--r--main/php_variables.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/main/php_variables.c b/main/php_variables.c
index 84d341492e..33d3c7d696 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -515,6 +515,14 @@ static inline void php_register_server_variables(TSRMLS_D)
if (SG(request_info).auth_password) {
php_register_variable("PHP_AUTH_PW", SG(request_info).auth_password, array_ptr TSRMLS_CC);
}
+ /* store request init time */
+ {
+ zval new_entry;
+ Z_TYPE(new_entry) = IS_LONG;
+ Z_LVAL(new_entry) = sapi_get_request_time(TSRMLS_C);
+ php_register_variable_ex("REQUEST_TIME", &new_entry, array_ptr TSRMLS_CC);
+ }
+
PG(magic_quotes_gpc) = magic_quotes_gpc;
}
/* }}} */