echo 3232238115 % 256; //-221
------解决方案--------------------
应该算是吧,php的取模好像是针对整数的
看手册,有个人写的大整数取模
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.'<br>';
}
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
*/