vinkla/hashids

gmp_mod(): Unable to convert variable to GMP - wrong type

abhiburk opened this issue · 2 comments

I got this error while encoding a float value
eg Hashids::encode(150.0);

But casting it is solving the problem

eg Hashids::encode(intval(150.0));

Could you help if it's a bug or Im doing it n a wrong way..

GMP doesn't do float values. What reason do you have for using float values in the first place?

We only support integers at the current state of the project.

As always, thanks for helping out @miquelfire 🙌