What are the differences in handling large numbers between 32-bit and 64-bit PHP systems, and how can developers ensure consistency in their calculations?

When handling large numbers in PHP, developers may encounter inconsistencies between 32-bit and 64-bit systems due to the limitations of integer size in each system. To ensure consistency in calculations, developers can use the BCMath extension in PHP, which provides arbitrary precision mathematics functions.

$num1 = '12345678901234567890';
$num2 = '98765432109876543210';

$sum = bcadd($num1, $num2);
echo $sum;