Please consider the following code snippet:
From php-5.3.1/ext/session/session.c:
PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS)
…
gettimeofday(&tv, NULL);
…
/* maximum 15+19+19+10 bytes */
spprintf(&buf, 0, "%.15s%ld%ld%0.8F", remote_addr ?
remote_addr : "", tv.tv_sec, (long int)tv.tv_usec,
php_combined_lcg(TSRMLS_C) * 10);
…
return buf;
}
I have found it on the internet. But I can't understand what code is this. I guess this is the implementation of a php function in C++. If yes, then please explain me how php calles c++ function in it?