DEV Community

Discussion on: the web developer dream - learn the AJAX technique

Collapse
suckup_de profile image
Lars Moelleken

Your php example is maybe a little confusing because of the "try catch finally". Casting into "int" from a request will never throw a exception because the request is always a string or an array of strings and that can be converted into integer. (also if the result is maybe unexpected)

3v4l.org/eTdZr