Reversing digit of previous two terms and adding them
$ x = reversDigits ( $ first ) ; $ y = reversDigits ( $ second ) ; echo ( $ x + $ y ) , " ▁ " ; $ temp = $ second ; $ second = $ x + $ y ; $ first = $ temp ; } } }