ajoo Posted December 11, 2014 Share Posted December 11, 2014 Hi, Is there any way to use the inbuilt filter functions in PHP to filter for integer values greater than 256? All examples that I saw had a max_range of 256. Kindly suggest. Thanks. Link to comment https://forums.phpfreaks.com/topic/293034-how-to-filter_var-integers-for-bigint-values/ Share on other sites More sharing options...
Barand Posted December 11, 2014 Share Posted December 11, 2014 A signed integer will hold up to 2,147,483,648 (ie 2^31) Link to comment https://forums.phpfreaks.com/topic/293034-how-to-filter_var-integers-for-bigint-values/#findComment-1499299 Share on other sites More sharing options...
ajoo Posted December 11, 2014 Author Share Posted December 11, 2014 Hi Guru Barand, Does that mean that we can simply use a higher value in the max_range in options array of the filter_var and it would do the trick ? Thanks again ! Link to comment https://forums.phpfreaks.com/topic/293034-how-to-filter_var-integers-for-bigint-values/#findComment-1499348 Share on other sites More sharing options...
Barand Posted December 11, 2014 Share Posted December 11, 2014 So long as that "higher value" isn't higher than 2147483648 Link to comment https://forums.phpfreaks.com/topic/293034-how-to-filter_var-integers-for-bigint-values/#findComment-1499349 Share on other sites More sharing options...
ajoo Posted December 11, 2014 Author Share Posted December 11, 2014 Yes Sir ! Thanks Loads. Link to comment https://forums.phpfreaks.com/topic/293034-how-to-filter_var-integers-for-bigint-values/#findComment-1499350 Share on other sites More sharing options...
Barand Posted December 11, 2014 Share Posted December 11, 2014 My mistake, the highest value is 2147483647 (2^31 - 1) Link to comment https://forums.phpfreaks.com/topic/293034-how-to-filter_var-integers-for-bigint-values/#findComment-1499358 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.