Skip to content

tcolar/phpserializer

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

PHPSerializer for Go

Purpose

This package provide some Features to decode/encode PHP serialialized objects into Go structures.

See phpserializer_test.go for usage examples.

But Why ?

At work (Rivet & Sway) I needed to handle some data from a Drupal database from Go.

Among all the terrible things Drupal does one particular painful one is that it stores serialized PHP objects in the database (in text fields) ... Yeah, really !

Added to that there is apparently NO official PHP serializtion format specifications, other than checking the PHP source code and crying in the process.

So anyway this allows Encoding/Decoding Serialized PHP object strings into Go structures. There is no guarantees it supports all possible PHP objects at this point, pull requests welcome.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages