The answer is TL, DR - yes. By clicking on (int)you canβt get anything but an integer.
The trick can take place where it can lead to unwanted behavior. Take your code
$id = (int)$_REQUEST['id'];
Now if we call it
page.php?id=lolsqlinjection
$id 0 ( 0). . , 0 - . , , , ( MySQLi, PDO)
$prep = $DB->prepare("SELECT name FROM items WHERE id=?");
$prep->bind_param('i', $_REQUEST['id']);
$prep->execute();
, , , . , SQL- MySQL "lolsqlinjection". . , , 0 .