Is there any particular difference between intval and (int)?

Example:

$product_id = intval($_GET['pid']);
$product_id = (int) $_GET['pid'];

Is there any particular difference between above two lines of code?

7 Answers
7

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *