> > > Alternatively, could the problem perhaps be mitigated by making > > available some utility functions for serializing native types? > > We could definitely make some parts of serializer API-accessible, or > even make serializer as a whole to be more API-friendly, I think it'd be > a nice idea if making implementing Serializable would be made easy by > reusing serializer code and combining pieces. If now it's hard making it > easier definitely a good idea, much better than creating one more API IMHO. >
I was thinking about that and it could actually be done in a way that would resolve the problem. I have just created RFC that specify the API. https://wiki.php.net/rfc/internal_serialize_api It's backward compatible and allow portable object generation in more abstract way. It's just draft so I am happy to do changes. Jakub