PHP reverse number program

It is very easy to reverse a number using PHP string function strrev().

But here i will show you without using strrev() function.

Output:

54151