A simple data serializer in C, wrapped in php extension