Skip to content

[Feature Request] Optional native types for numeric fields #38

@dcelasun

Description

@dcelasun

As you've described in the wiki, all numeric types are converted to string in PHP. I understand why you chose this (PHP doesn't handle scalar primitives very well), but maybe you can provide a config option for this?

For example:

ini_set("protocolbuffers.native_scalars",1);

This way we can have this:

.proto type php type
double double
float double
int32 int
int64 int
uint32 int
uint64 int
sint32 int
sint64 int
fixed32 int
fixed64 int
sfixed32 int
sfixed64 int

This would have better performance on 64bit Linux and OS X systems. Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions