No need to cast
Because PHP is a weak type
So even if you think it is string type data, when you need it to be int, PHP It will be processed into int.
Give me an example
Suppose your mysql saves a char type "10"
and then assigns it to $a;
Then print($a+1);
The result will be 11.
That is to say, php does not care what type it is.
If you want to get a result like 101 you should write print($a.'1');