iliaa Sun Oct 24 13:41:14 2004 EDT
Modified files:
/php-src NEWS
/php-src/main php_variables.c
Log:
Make request start time be available via $_SERVER['REQUEST_TIME'].
# As discussed on internals.
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1822&r2=1.1823&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1822 php-src/NEWS:1.1823
--- php-src/NEWS:1.1822 Thu Oct 21 17:20:52 2004
+++ php-src/NEWS Sun Oct 24 13:41:13 2004
@@ -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
http://cvs.php.net/diff.php/php-src/main/php_variables.c?r1=1.83&r2=1.84&ty=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.83 php-src/main/php_variables.c:1.84
--- php-src/main/php_variables.c:1.83 Mon Oct 18 11:05:06 2004
+++ php-src/main/php_variables.c Sun Oct 24 13:41:13 2004
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_variables.c,v 1.83 2004/10/18 15:05:06 tony2001 Exp $ */
+/* $Id: php_variables.c,v 1.84 2004/10/24 17:41:13 iliaa Exp $ */
#include <stdio.h>
#include "php.h"
@@ -515,6 +515,14 @@
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;
}
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php