- pow: documentation ( source)
<?php
$bits32 = 32;
$bits64 = 64;
$N32 = 0xfffffffe;
$N64 = 0xfffffffffffffffe;
$result = -( pow(2, $bits32) - $N32 );
echo $result,"\n";
echo pow(2,$bits32) , "\n",$N32;
$result = -( pow(2, $bits64) - $N64 );
echo $result,"\n";
echo pow(2,$bits64) - PHP_INT_MAX, "\n",$N64 - PHP_INT_MAX;