BCmath を使用して 64 ビットの符号なし整数を計算しています。bcmath オブジェクトを通常の int (上位、下位部分) に変換したいのですが、どうすればそれを達成できますか?
ご協力ありがとうございました
組み込みの BCMath 関数は、BCMath オブジェクト自体を処理するのではなく、文字列を処理して任意精度の計算を行うだけです。したがって、通常のキャストでネイティブ php int に戻すことができます。
$val = (int) bcmod( bcpow( "9392", "394" ), "100" );
http://php.net/manual/en/book.bc.phpから、メソッドのシグネチャは
string bcmod ( string $left_operand , string $modulus )
string bcpow ( string $left_operand , string $right_operand [, int $scale ] )