protected function getPid() { $pid = null; if (!function_exists('posix_getpid')) { $pid = getmypid(); } else { $pid = posix_getpid(); } return $pid; }