LMSouq
php-dev Open

Tracking the script execution time in PHP

TW
twk
1 month ago
3 views
Problem Description
PHP must track the amount of CPU time a particular script has used in order to enforce the max_execution_time limit. Is there a way to get access to this inside of the script? I'd like to include some logging with my tests about how much CPU was burnt in the actual PHP (the time is not incremented when the script is sitting and waiting for the database). I am using a Linux box.

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base