title: How to check if an integer is within a range?
body: <p>Is there a way to test a range without doing this redundant code:</p>
  
  <pre><code>if ($int&gt;$min &amp;&amp; $int&lt;$max)
  </code></pre>
  
  <p>?</p>
  
  <p>Like a function:</p>
  
  <pre><code>function testRange($int,$min,$max){
      return ($min&lt;$int &amp;&amp; $int&lt;$max);
  }
  </code></pre>
  
  <p>usage:</p>
  
  <pre><code>if (testRange($int,$min,$max)) 
  </code></pre>
  
  <p>?</p>
  
  <p>Does PHP have such built-in function? Or any other way to do it?</p>