Description: The Java version of PHP serialize/unserialize the full implementation. The serialization of various basic types, arrays, arraylists, hashmaps, and other serializable objects has been implemented. Implemented support for the Serializable interface in PHP 5. Support for __sleep and __wakeup magic methods in PHP. Implemented for all marked (N, b, I, d, s, a, O, R, R, U, C) deserialization, when to sign a deserialized, can automatically according to the index and value judgment is a ArrayList or a HashMap. And you can force the deserialization type to be specified in deserialization. This class is a static class that does not need nor can be instantiated. Besides contains serialize and unserialize method, also added a cast method, used to deserialize type conversion, the method is mainly used for converting the ArrayList after deserialization to an array or a HashMap.
File list (Check if you may need any files):
PHPSerializer.java