title: Reverse of number in PHP not showing correct output
body: <p>I have made a program to reverse the number but every time <code>0</code> gets appended to the result.</p>
  
  <pre><code>$num = 675;
  $rev = 0;
  
  while($num &gt; 0) {
  $temp = $num % 10;
  $rev = ($rev *  10) + $temp;
  $num = (int) $num / 10;
  }
  
  echo $rev;   //result is 5760
  </code></pre>