Tuesday, 15 January 2013

class - what are those numbers in php serialize output -



class - what are those numbers in php serialize output -

class aclas { private $v = 1; private $z; protected $y; public $xy; } $obja = new aclas; echo serialize( $obja );

i output follows

o:5:"aclas":4:{s:8:"aclasv";i:1;s:8:"aclasz";n;s:4:"*y";n;s:2:"xy";n;}

but please tell me s:8 after opening curly brace.

{s:8:"aclasv", string, length 8.

i looking documentation 1 sec.

update: not seeming find documentation on it. maybe i'll link corresp. php source code... curious too. might easier reverse engineer , create sense of it.

best link pretty cool, code has total parser: https://github.com/ktomk/serialized

serialized set of classes can parse serialized info normalized representation (semi structured info or s-expression).

php class object serialization numbers

No comments:

Post a Comment