3 Write a PHP script to reverse a given number and calculate its sum.
< ? php
$num = 23456;
$revnum = 0;
$sum=0;
while ($num > 1)
{
$rem = $num % 10;
$revnum = ($revnum * 10) + $rem;
$num = ($num / 10);
$sum=$sum+$rem;
}
echo "
Reverse number of 23456 is: $revnum";
echo "
Sum of number of 23456 is: $sum";
? >