Thanks for the response Derick, So is the data structure thats being serialized remaining in some form thats reflective of its binary encoding on the system. Or is there some byte-encoding that goes on to generalize the binary structure?
I guess ... Does it find the values in memory of the distinct values, and then create a serialized set of indexes in a c-compatible data-type? or... is this just another form of string serialization, where variables are represented by strings encoded in ASCII? If this is a binary serialization two additional questions: 1.) Does this mean that you can to some accuracy determine the size of an in-memory variable by counting the sizeof() on the components that make up the data-structure in C? 2.) Can the PHP sessions serialization be made to use this type of serialization - so the serialized values could be shared between multiple applications.. (let me give you an example) Would I be better off just re-implementing the PHP C code for its session serializer/deserializer in Python than attempting to keep it binary? For PHP Sessions, lets say you use memcached to store a serialized representation of the session. Lets also say that you would like to read that session data occasionally by python to offload work that your webserver would normally have to perform. If you were to write a binary serialized form to memory - the C implementation of the serialization could by very easily ported to Python as an extension and both could be maintained with ease (as both PHP and Python are written in C, a Java variant wouldn't be too hard either using JNI) I guess this brings up the question of - How hard would it be to expose the binary object that dbus sends over-the-wire so it could be written to file instead? Overall it would be nice if PHP had a functionality similar to Pythons Pickle -> to expose to the user so they could store binary representations of objects as they saw fit. It seems to me this would be vastly more efficient than an ascii-encoding and serialization as well. If my logic is poorly formed because of a lack of understanding please feel free to educate me! Thanks Again Derick - Cheers! -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php