Facebook returning cover id as int, turns into float on my machine

http://screencast.com/t/XFRuJtLg

Why would they not send this through as a string? My system converts this to a float and then I lose the accuracy of the id because it is rounding poorly. Am I missing something?

Answers


If you’re having this problem while using json_decode(?) – then just set the option JSON_BIGINT_AS_STRING as 4th parameter in the function call.

http://www.php.net/manual/en/function.json-decode.php


It is appearing as a float because you are suffering from integer overflow.

You will need to look into how your development environment handles 64 bit integers. You might need to specially add a bigint library, if there is not native support. BCMath is one such library

"If PHP encounters a number beyond the bounds of the integer type, it will be interpreted as a float instead." http://php.net/manual/en/language.types.integer.php


Need Your Help

Where the mail is addressed within Symfony2?

php email symfony config swiftmailer

I am implementing the SwiftmailerBundle and everything seems to work fine, but not really if the mail is sent . I wanted to ask where the mails are stored inside Symfony2 . I show my code: