Post
Topic
Board Bitcoin Technical Support
Re: Private Key to WIF?
by
DannyHamilton
on 18/11/2013, 20:25:12 UTC
As you exit this loop:

Code:
while (gmp_strval($divmod[0]) >= 58)
{
$divmod = divmod($divmod[0], 58);
$out = $alphabet[gmp_strval($divmod[1])] . $out;
}

$divmod[0] = 4

But you never use that value.  You exit the loop and print out the conversion that you've done so far, but you never calculate the final $alphabet[gmp_strval($divmod[0])]