PHP serialize()/unserialize() module, and a dotlocker

Might be handy to some of those web guys using Ruby backends to PHP
frontends; I’ve just written PHP::serialize() and PHP::unserialize(),
which cope with Array, Hash, String, Fixnum, Float, NilClass,
False/TrueClass both ways, with a minor limitation on Struct (returned
as Hash for now).

It even distinguishes between Array and Hash on unserialize, despite PHP
not knowing the difference, which puts it one-up on the Perl version I
found. It doesn’t split it into an array of characters like that one
did, either… :slight_smile:

I’ve also written a small dotlocking class which should be functionally
identical to the dotlocking implementation ecartis uses, which might
come in handy for manipulating mbox files, ecartis userfiles, and
anything else which might use dotlocking.

If anyone has a desperate need for them, mail me privately. I’ll
probably RAA them soon, but knowing me that might not even be this year
:wink:

···


Thomas ‘Freaky’ Hurst - freaky@aagh.net - http://www.aagh.net/

Struct’s are now handled, along with (in theory) any other PHP object
instance, which can be mapped to native Ruby objects or an automatically
generated Struct.

It’s available at http://www.aagh.net/files/ruby/php_serialize.rb

···

Might be handy to some of those web guys using Ruby backends to PHP
frontends; I’ve just written PHP::serialize() and PHP::unserialize(),
which cope with Array, Hash, String, Fixnum, Float, NilClass,
False/TrueClass both ways, with a minor limitation on Struct (returned
as Hash for now).


Thomas ‘Freaky’ Hurst - freaky@aagh.net - http://www.aagh.net/