php validate integer [updated]
- by George Garchagudashvili
Read B
A:
I'll give quick example:
$a = "\n \t 34 3"; // string(9)
$aint = intval($a); // int(34)
var_dump($a == $aint);
result:
bool(true)
call me noob but can you tell me why/how does these variables do pass equalization test?
What I want to achieve is to check if '1989' equals 1989 would be true, but not any other case. ex: '1989 '…