Bu pasajı düşünün lütfen (related to How is 13 % 64= -13) em>
if(extension_loaded('GMP')) {
printf("
PHP Version: %s
gmp_strval(gmp_mod('-13', '64')) = %s
gmp_strval(gmp_mod(-13, 64)) = %s
gmp_mod(-13, 64) = %s
",
phpversion(),
gmp_strval(gmp_mod('-13', '64')),
gmp_strval(gmp_mod(-13, 64)),
gmp_mod(-13, 64)
);
}
Benim Win7, x64 üzerinde bu üretir
PHP Version: 5.3.3
gmp_strval(gmp_mod('-13', '64')) = 51
gmp_strval(gmp_mod(-13, 64)) = -51
gmp_mod(-13, 64) = -51
üzerine http://codepad.viper-7.com/gqN5aa sadece 51 üretir, çünkü garip olan.
I could not find a bug for gmp_mod
PHP BugTracker üzerine . But there is also nothing at the manual page farklı olası sonuçları ima. Farklı sonuçlar üretmesi gerektiğini Ve neden görmüyorum.
Please run the above code snippet and post the output along with which Operating System and CPU Architecture you are using, so I can confirm it is not just my machine acting up.
Ayrıca, bu bilinen bir sorun, hatta beklenen davranış, bugtracker bir bağlantı bana gelin lütfen olmadığını biliyorum. Aksi takdirde toplanan sonuçları ile bir hata açılacaktır.
Teşekkürler!
P.S. please let me know if I should request CW for this. Otherwise I will put the link to the bugtracker as the answer (unless someone comes up with a compelling explanation).