Skip to content
/ gophp Public
forked from leeqvip/gophp

Golang implementation for PHP's functions

License

Notifications You must be signed in to change notification settings

NztForum/gophp

 
 

Repository files navigation

gophp

Build Status

Golang implementation for PHP's functions

Install / Update

go get -u github.com/leeqvip/gophp

Example

package main

import (
	"fmt"

	"github.com/leeqvip/gophp"
)

func main() {

	str := `a:1:{s:3:"php";s:24:"世界上最好的语言";}`

	// unserialize() in php
	out, _ := gophp.Unserialize([]byte(str))

	fmt.Println(out) //map[php:世界上最好的语言]

	// serialize() in php
	jsonbyte, _ := gophp.Serialize(out)

	fmt.Println(string(jsonbyte)) // a:1:{s:3:"php";s:24:"世界上最好的语言";}

}

License

This project is licensed under the MIT license.

About

Golang implementation for PHP's functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%