title: What approach of functions shall I use
body: <p>A very basic question it is but I wanted expert advice that is why posting it here.</p>
  
  <p>Here are two functions,<br>
  what is the difference between the two ? Are both of them equivalently efficient and includes best practices or Which one of them is better to use in programming.</p>
  
  <pre><code>function is_numeric($number)
  {
      if(!preg_match("/^[0-9]+$/",$number))
          return false;
      return true;
  }
  
  function is_numeric($number)
  {
      if(preg_match("/^[0-9]+$/",$number))
          return true;
      else
          return false;
  }
  </code></pre>