I'm interacting with the facebook api which is sending me back some rather large id for instance
$facebook_action['id'] => "123540931515315"
intval($facebook_action['id']) gives me "2147483647"
In my database I had planned to store it as an integer however these might be too big as in php conversion returns to me the largest int value. Should I just be storing these as a string instead or how do I handle this?
In MySQL I see I can use BIG INTEGER however how can I handle this in PHP?
varchar. Not saying it's best practice, but it's what I did. Also because what if Facebook decides to add letters to their IDs or something strange. Since you don't control the data coming in, I say make it flexible. Integers are pretty rigid and they can't start with 0. So, just saying, strings are more flexible with data you don't control.