Mira sacando el casting a int de todos se comportan exactamente iguales en ambos lados...
Código PHP:
Ver originalfunction ticket($pin)
{
$istore2 = 0;
$istore3 = 1313;
for ($w = 0; $w < $bucle ; $w++) {
$istore5 = ord($pin[$w]); echo $istore5 .'<br>';
//$istore2 = ((int)$istore2 * (int)$istore3);
$istore2 = bcmul($istore2, $istore3); echo 'i2:'. $istore2 .'<br>';
//$istore21= (((((int)$istore5 * (int)$istore5) * (int)$istore5) * 667)* (int)$w);
echo $istore21 .'<br>';
//$istore2 = (int)$istore2 + (int) $istore21;
$istore2 = bcadd( $istore2, $istore21); echo $istore2 .'<br>';
}
//$istore2 = ((int)$istore2 & 2147483647) % 65536;
$istore2 = bcmod( ($istore2 & 2147483647), 65536); echo ':'.$istore2 .'<br>';
for ($istore5 = 4; $istore5 >= 0; $istore5-- ) {
//$astore4[$istore5] = ((int)$istore2 % 10) + 48;
$astore4[$istore5] = bcadd( bcmod($istore2, 10), 48); //$istore2 = (int)$istore2 / 10;
$istore2 = bcdiv($istore2, 10); }
$key=0;
for ($i=1; $i<count($astore4); $i++){ }
return $key;
}
print 'Tichet: ' . ticket("216B22DD") . '<br />';
echo PHP_INT_SIZE . '<br/>';
echo PHP_INT_MAX;
P.D.: Después dime como al final lo pudiste solucionar, uno nunca sabe cuando va a caer en estos problemas...
Saludos