]> granicus.if.org Git - php/commitdiff
Make request start time be available via $_SERVER['REQUEST_TIME'].
authorIlia Alshanetsky <iliaa@php.net>
Sun, 24 Oct 2004 17:41:13 +0000 (17:41 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 24 Oct 2004 17:41:13 +0000 (17:41 +0000)
# As discussed on internals.

NEWS
main/php_variables.c

diff --git a/NEWS b/NEWS
index aa09a21a39b148615d3e17d7736a7b16a64ea332..1215c95ff120d7a09e303b5cc635c3e704210c48 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2004, PHP 5.1.0
+- Make request start time be available via $_SERVER['REQUEST_TIME']. (Ilia)
 - Allow gettimeofday() return a float if optional argument is specified. (Ilia)
 - Added sqlite_fetch_column_types() 3rd argument for arrays. (Ilia)
 - Added optional offset parameter to stream_get_contents() and 
index 84d341492ea26479f8adea12e9f66548e764af21..33d3c7d696a123bcb9e5e1451185f2c2dabd21ed 100644 (file)
@@ -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;
 }
 /* }}} */