I am searching for the specification or an exact description about how the PHP serialize() function exactly works. All I could find for that topic is that comment in the manual.
Is there anywhere out there a more detailed description about how php implements this?
To truly know how PHP handles serialized strings, one would need to dig in the sourcecode as suggested by Pekka 웃 in the comments.
Try starting at: http://lxr.php.net/search?q=PHP_FUNCTION+serialize&project=PHP_5_4 which gives a convenient way to search the sources.
This link comes from http://nikic.github.io/2012/03/16/Understanding-PHPs-internal-function-definitions.html which explains how to find specific function definitions in the php source.
Goodluck!
I wanted to dig into this years ago. Warning: this blogpost is way old. I think the spec is still accurate, but ignore the content around it ;)
http://evertpot.com/133/ Jump to the section titled: The serialized data format.
It is sad, PHP do not provide specification of serialization.
You can explore source code https://github.com/php/php-src/blob/master/ext/standard/php_var.h, https://github.com/php/php-src/blob/master/ext/standard/var_unserializer.c . But it's hard to understand.
You can try to search implimentation on other languange. JavaScript.