As of PHP 5.1, the request start time is stored by PHP inside the sapi structure. This data is populated by the information offered by the SAPI (Apache sapis populate it) otherwise time(0) is used to get the same data.

This means that PHP has a "free" unix timestamp that tells information about the request start time, which does not require a syscall.

. Since a lot of script end up having to fetch request start time, this can be used to save on a timing call
(This information only has second precision, no microseconds).


The question is what would be the best way to provide this information within the script. The two alternatives are: adding a new function to get this info or storing this data inside $_SERVER.

What do you think?

Ilia

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to