时间:2021-07-01 10:21:17 帮助过:30人阅读
function my_bcmod( $x, $y ) {
$take = 5;
$mod = '';
do{
$a = (int)$mod.substr( $x, 0, $take );
$x = substr( $x, $take );
$mod = $a % $y;
echo $a.'-'.$x.'-'.$mod.'
';
}
while ( strlen($x) );
return (int)$mod;
}
echo my_bcmod( "7044060001970316212900", 150 );//50
/*
070440-60001970316212900-90
9060001-970316212900-1
197031-6212900-81
8162129-00-29
2900--50
*/