Stepwise Progression of the Expanded
Euclidean Algorithm in PHP

HINT: The modulo % operator yields the remainder of division and the quotient is ignored.
HENCE: 5 ÷ 2 = 2.5, but 5 % 2 = 1 {1 remaining after dividing 5 by 2}.                         Refresh this page.

4 random numbers 445 379 362 302
multiply by 3 1335 1137 1086 906
sort from left to right 906 1086 1137 1335
shift to the right 0 906 1086 1137
modulo remainder 906 180 51 198
sort from left to right 51 180 198 906
shift to the right 0 51 180 198
modulo remainder 51 27 18 114
sort from left to right 18 27 51 114
shift to the right 0 18 27 51
modulo remainder 18 9 24 12
sort from left to right 9 12 18 24
shift to the right 0 9 12 18
modulo remainder 9 3 6 6
sort from left to right 3 6 6 9
shift to the right 0 3 6 6
modulo remainder 3 0 0 3
sort from left to right 3 3    
shift to the right 0 3    
modulo remainder 3 0