In benc.php line 87: if (preg_match('/^i(\d+)e/', $s, $m)) { change to: if (preg_match('/^i(-{0,1}\d+)e/', $s, $m)) {