NOTE: This code is not anywhere near complete or correct.
This code is my attempt one boring day to write something in java that
would serialize and unserialize to PHP's serialization format
(similar to what i did with
perl
and
python)
Overview
I wrapped all unserialized values in a "PHPValue" wrapper class
that would help me avoid dealing with java's type system.
When a string, integer, etc... is unserialized, the unserialize method
returns a PHPValue class containing the unserialized value, which can
then be interpreted by the java code however it needs to be.
Serializing to PHP
serializing kinda-sorta works, but is probably broken, it's more
elegant than unserializing and shows more promise of one day being useful.
Un-serializing from PHP
unserializing is a bad hack and is mostly broken.
Download
v0.1 alpha - May 19, 2004