Get your own PHP server Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<?php
// Variable to check
$int = 0;
if (filter_var($int, FILTER_VALIDATE_INT)!== false) {
  echo("Variable is an integer");
} else {
  echo("Variable is not an integer");
}
?>
</body>
</html>
Variable is an integer