// first, we can just check the lengths of the numbers, this can help save processing time // if $Num1 is longer than $Num2, return 1.. vice versa with the next step.if(strlen($Num1)>strlen($Num2)) return(1); else { if(strlen($Num1)<strlen($Num2)) return(-1);

// if the two numbers are of equal length, we check digit-by-digitelse {