PHP under Linux implements ini(max_execution_time) and set_time_limit by using ITIMER_PROF in setitimer, but not ITIMER_REAL. by google it, i found a thread in php.net about this question https://bugs.php.net/bug.php?id=65596. Related to PHP Manual http://php.net/manual/en/function.set-time-limit.php note
The set_time_limit() function and the configuration directive max_execution_time only affect the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, etc. is not included when determining the maximum time that the script has been running. This is not true on Windows where the measured time is real. PHP seems designed to use ITIMER_PROF.
I want to know why PHP timeout mechanism designed that way, and if i change ITIMER_PROF to ITIMER_REAL in Zend/zend_execute_API.c , what side-effect would show ?