Greetings,

I'm new to php coding so I'm trying to learn it a little at a time. Right now I'm trying to validate a variable that it contains an integer. So I'm trying to use the filter_var function as follows:

Code:
<?php
$age=55;
echo "Age: $age" . "<br />";
if ($age==55) echo "Right age <br />";
echo "Past <br />";
$tmp = filter_var($age, FILTER_VALIDATE_INT);
echo "filter $tmp <br />";
?>
The output I get is:

Code:
Age: 55
Right age
Past
The last echo never prints. It's like it stops execution on the function. Why?
Any help appreciated.
Thanks