ie:
Code: Select all
$my_int = (int)$_GET['my_int'];I've tried:
Code: Select all
$test = 'm123';
$my_int = (int)$test;So the way I see it explicit casting should be a safe way to sterilize numeric input from users...
Any objections, comments, etc...?
Cheers