gerhardberger / phpserialize

πŸ“‘ PHP serialize() and unserialize() for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

PHP serialize() and unserialize() for Go.

Install / Update

go get -u github.com/elliotchance/phpserialize

phpserialize requires Go 1.8+.

Example

package main

import (
	"github.com/elliotchance/phpserialize"
	"fmt"
)

func main() {
	out, err := phpserialize.Marshal(3.2, nil)
	if err != nil {
		panic(err)
	}

	fmt.Println(string(out))

	var in float64
	err = phpserialize.Unmarshal(out, &in)

	fmt.Println(in)
}

About

πŸ“‘ PHP serialize() and unserialize() for Go

License:MIT License


Languages

Language:Go 100.0%