0
Today I was making a web application working with $_REQUEST.
However I noticed that when performing an UPDATE the value went wrong, and when I looked at the functions in php, that was the most bizarre.
Realize that the intval() when you receive the request, the value changes completely!
Can anyone tell me why this happens?
It seems to me that your variable is greater than the value allowed for the type "int" in 32bit systems and possibly when you use intval() it changes to the highest possible value.
– Diego Schmidt
Shows the code that generated this difference
– rray
Take a look at doc: http://php.net/manual/en/function.intval.php
– Diego Schmidt
This is probably happening because the maximum value of
int
is2147483647
*. With the reported value exceeds this maximum value, it is reduced.– Valdeir Psr
@Diegoschmidt blza man, thanks for your help. I believe that in this case, because it’s registration fields, it’s important to use a limiter or something like that, I didn’t know there was such a thing!
– Gerson Abimael