Skip to content

gvenkat/php-serializer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A very simple PHP serializer and unserializer

I'm just trying my hand at trying to parse PHP serialized data structures into ruby structures and back. PHP has no distinction between arrays and hashes, so all arrays are hashes in here. Also, PHP Also serializes objects with class names, These are unserialized as hashes with all properties contained in the object, additionally __class property is added containing the class to which the PHP object belongs to

TODO:

  • Doesn't parse floating point numbers
  • Doesn't serialize yet

Its still work in progress.

  require 'php'

  result = PHP::Serializer.unserialize( serialized_php )

  serialized_string = PHP::Serializer.serialize( ruby_object )

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages