how can I check a variable for a whole number value in php
<p>If I was checking a variable to see if it was a whole number in bash the coding would be similar to </p>

<pre><code>if ! [[ "$yournumber" =~ ^[0-9]+$ ]] ; then 
</code></pre>

<p>Is there a way in php to check if the variable contains a whole number?</p>

<p>Thank you all I guess I need to clarify that I want to evaluate that the number does not have a decimal value example is nuber 1  vs  1.2 or any other value with a decimal after it.
Thanks in advance.</p>
