Re: Possible RFC: $_SERVER['REQUEST_TIME_FLOAT']

From: Date: Wed, 12 Apr 2023 10:15:50 +0000
Subject: Re: Possible RFC: $_SERVER['REQUEST_TIME_FLOAT']
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-119949@lists.php.net to get a copy of this message
On Wed, Apr 12, 2023 at 12:01 PM Herbert Groot Jebbink < herbert@groot.jebbink.nl> wrote: > Hello, > > With this mail I want to do the first step of a RFC: "1. Email > internals@lists.php.net to measure reaction to your intended proposal." > > I'm in the process of using hrtime(true) instead of microtime(true), for > this it would be great if REQUEST_TIME_HR would also exist next to > REQUEST_TIME and REQUEST_TIME_FLOAT > > The implementation can be done with adding below 2 lines to > main/php_variables.c where REQUEST_TIME and REQUEST_TIME_FLOAT are also > defined. > > ZVAL_LONG(&tmp, php_hrtime_current()); > php_register_variable_quick("REQUEST_TIME_HR", > sizeof("REQUEST_TIME_HR")-1, &tmp, ht); > > With Kind Regards, Herbert > pfff, the "forgot to change after a copy/paste" mistake, the variable in the subject must be $_SERVER['REQUEST_TIME_HR']

« previous php.internals (#119949) next »