title: How to prefix a positive number with plus sign in PHP
body: <p>I need to design a function to return negative numbers unchanged but should add a <code>+</code> sign at the start of the number if its already no present.</p>
  <p>Example:</p>
  <pre><code>Input     Output
  ----------------
  +1         +1
  1          +1
  -1         -1
  </code></pre>
  <p>It will get only numeric input.</p>
  <pre><code>function formatNum($num)
  {
  # something here..perhaps a regex?
  }
  </code></pre>
  <p>This function is going to be called several times in <code>echo/print</code> so the quicker the better.</p>