Binary GCD implementation in php. Recursive version.