Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否解除php5.6版本限制 #1

Open
lifeforfun opened this issue May 16, 2016 · 5 comments
Open

能否解除php5.6版本限制 #1

lifeforfun opened this issue May 16, 2016 · 5 comments

Comments

@lifeforfun
Copy link

lifeforfun commented May 16, 2016

首先感谢大神开发php版本的淘宝TMC sdk!
源码里除了int长度过大问题需要注意的(可以修改php.ini解决),其他也没有硬性决定低版本php不可用的地方,为何代码中硬性检测php版本必须大于5.6呢?

@period331
Copy link
Owner

我没有试过修改php.ini,兴许我们可以交流一下
限制的原因是因为解二进制包的时候不支持int64的解包,只有56以后版本的pack可以,所以才做了限制

2016年5月16日星期一,lifeforfun notifications@github.com 写道:

源码里除了int长度过大问题需要注意的(可以修改php.ini解决),其他也没有硬性决定低版本php不可用的地方,为何代码中硬性检测php版本必须大于5.6呢?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1

发自iPhone版Gmail

@lifeforfun
Copy link
Author

lifeforfun commented May 17, 2016

pack 确实有限制,是否可以考虑下自己实现64位解包? Pack and unpack 64 bit integer
php.ini 下面这个precision选项可以控制整形长度,不知道有没有用
image

@period331
Copy link
Owner

@lifeforfun
没有用

@lifeforfun
Copy link
Author

没想到您还在关注这个项目,好人一生平安!

@lifeforfun
Copy link
Author

GMP 这个扩展可支持大字节整型
gmp_init传入解包出的16进制字符串即可

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants