= 1) { if ($A % 2 == 1) { $total += $B; } $A = floor($A / 2 ); $B = $B * 2; }; return $total; } echo ethiopian_muliply(10, 20);