3 ms·
> Go has typed container types while PHP has not. I suggest looking at https://github.com/Crell/Serde https://github.com/Crell/Serde, if that is a requirement
by withinboredom 2y ago
> Go has typed container types while PHP has not.
I suggest looking at https://github.com/Crell/Serde https://github.com/Crell/Serde, if that is a requirement in PHP.
> PHP is more convenient at another common case which is heterogeneous maps.
Or arbitrary, user-defined keys...
> If you want/need to walk through it in a single pass fashion, then Go is definitely more fitting.
array_map, array_reduce, array_column is pretty good at walking through arrays very quickly, assuming you parsed the json into arrays instead of objects.
- deleted 2y ago[deleted]
- kmwr 2y agoGo has builtin typed container types while PHP has not.