为什么PEAR Math_BigInteger(48)=> 0? (案例:MATH_BIGINTEGER_MODE =>默认)

I used PEAR/Math/BigInteger.php

  1. PHP 5.2.5 (cli)
  2. ubuntu

but

$a = new Math_BigInteger(48);
echo $a -> toString()// '0'

Why? is it a bug?

it is specific of MATH_BIGINTEGER_MODE => default

3528 function _int2bytes($x)

pack('N', 48) => 0

we need

if('48'===(string)$x){$this->value=array('48');return;}

It works for me on a i686 system:

$ php -r 'require_once "Math/BigInteger.php"; $a = new Math_BigInteger(48); echo $a -> toString();'
48