I have a massive multidimensional array that has been serialised by PHP. It has been stored in MySQL and the data field wasn't large enough... the end has been cut off... I need to extract the data... unserialize
wont work... does anyone know of a code that can close all the arrays... recalculate string lengths... it's too much data to do by hand.
Many thanks.
I think this is almost impossible. Before you can repair your array you need to know how it is damaged. How many childs missing? What was the content?
Sorry imho you can't do it.
Proof:
Link: https://ideone.com/uvISQu
Even if you can recalculate length of your keys/values, you cannot trust the data retrieved from this source, because you cannot recalculate the value of these. Eg. if the serialized data is an object, your properties won't be accessible anymore.