Well, if bcpow has limits, then this should work:
<?php
function bcpow_($num, $power) {
$awnser = "1";
while ($power) {
$awnser = bcmul($awnser, $num, 100);
$power = bcsub($power, "1");
}
return rtrim($awnser, '0.');
}
?>
Just that $power cannot have decimal digits in it.