phpserialize icon indicating copy to clipboard operation
phpserialize copied to clipboard

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

Results 7 phpserialize issues
Sort by recently updated
recently updated
newest added

It seems the following is not supported: ```go var d interface{} err := phpserialize.Unmarshal(m, &d) ``` I wonder why? It would be nice to be able to just infer type?...

Previously, `DecodePHPString` could panic on this line due to the index being out bounds: https://github.com/elliotchance/phpserialize/blob/5bb5ecfe1e06ac452fc9ee460c8ae2674465e0ef/unserialize.go#L29 This fixes that. --- This change is [](https://reviewable.io/reviews/elliotchance/phpserialize/25)

phpserialize.Marshal(&we, &phpserialize.MarshalOptions{OnlyStdClass:false}) ``` O:10:"wechatData":12:{s:7:"errcode";i:0;s:6:"errmsg";……} ``` php serialize array ``` a:11:{s:7:"errcode";i:0;s:6:"errmsg";……} ``` how can i delete struct name `wechatData`

Add consumeStringUntilNotByte: it does what it says on the tin, consumes the string until it encounters a byte other than the lookingForByte. Use consumeStringUntilNotByte in consumeAssociativeArray to consume the '}'...

Nested associative array which are not the last item at a given parsing level will produce an error during read of the next result after the associative array because the...

This code fails: ```go package main import ( "github.com/elliotchance/phpserialize" "fmt" ) type A struct { Id string B *B } type B struct { Id string A *A } func...

+ add LaravelQueue flag on MarshalOptions + add StructName on MarshalOptions option to custom class name