Get your own PHP server

Cast to Integer

int(5)
int(5)
int(25)
int(0)
int(0)
int(1)
int(0)

When casting a string that starts with a number, (int) gets that number.

If the string does not start with a number, (int) convert strings to 0.