What's the easiest way to serialize a PHP op_array in C?
I'm working on a PHP extension and need to serialize a zend_op_array in C so I can store it and restore it later.
I know OPcache already serializes op arrays, but its implementation is quite complex. I'm looking for a much simpler approach, even if it doesn't support every OPcache optimization or edge case.
Is there an existing API, library, or recommended way to do this, or is manually serializing each field the only practical option?
Any suggestions or examples would be greatly appreciated.
Posted Jul 13, 2026, 10:47 AM UTC
10