Even though this question is old, it comes up as first result when Googling for BigInteger PHP, so for anyone interested, I open-sourced a library called Brick\Math offering BigInteger, BigDecimal and BigRational classes.
Usage
use Brick\Math\BigInteger;
use Brick\Math\RoundingMode;
Addition:
echo BigInteger::of('9999999999999999999999999')->plus(1);
// 10000000000000000000000000
Subtraction:
echo BigInteger::of('10000000000000000000000000')->minus(1);
// 9999999999999999999999999
Multiplication:
echo BigInteger::of('3333333333333333333333333')->multipliedBy(11);
// 36666666666666666666666663
Division:
echo BigInteger::of('1000000000000000000000')->dividedBy(3, RoundingMode::UP);
// 333333333333333333334
Exponentiation:
echo BigInteger::of(11)->power(50);
// 11739085287969531650666649599035831993898213898723001
You can easily chain method calls:
echo BigInteger::of(3)->multipliedBy(7)->minus(1)->dividedBy(10);
Installation
Just install with Composer and you're done:
composer require brick/math
The library automatically uses the GMP and BCMath extensions when available, to speed up calculations, but will also work without them thanks to a pure PHP implementation.