<script>
function hs(e, n) {
return e * n % e;
}
alert(hs(1752865668, 1716717484170));
//result: 1752622684
</script>
<?php
function hs($e, $n) {
return $e * $n % $e;
}
echo hs(1752865668, 1716717484170);
//result: 386969652
?>
Both results are different because of their different 53-bit & 32-bit integer range. How can I have the same result that JS calculated in PHP in this senario? (Without using GMP: GNU Multiple Precision) (Using PHP 8+)
In short: I need the PHP code snippet that exactly shows the same result as JS.
Thank you!