Golang在PHP中实现serialize()和unserialize()序列化和反序列化方法""github.com/leeqvip/gophp/serialize")funcmain(){str:=`a:1:{s:3:"php";s:24:"世界上最好的语言";}`//unserialize()inphpout,_:=serialize.UnMarshal([]byte(str))fmt.Println(out)//map[php:世界上最好的语言]//serialize()inphpjsonbyte,_:=serialize.Marshal(out)fmt.Println(string(jsonbyte))//a:1:{s:3:"php";s:24:"世界上最好的语言";}}github地址:https://github.com/leeqvip/gophp
