What are the advantages and disadvantages of storing decimal numbers as BCD (Binary Coded Decimal) versus binary numbers in PHP?

Storing decimal numbers as BCD (Binary Coded Decimal) in PHP can provide advantages such as easier conversion to and from human-readable decimal format, and improved accuracy in calculations involving decimal numbers. However, BCD requires more memory compared to storing numbers in binary format, which can be a disadvantage in terms of storage efficiency.

// Storing a decimal number as BCD in PHP
$decimalNumber = 123; // decimal number to store
$binaryNumber = decbin($decimalNumber); // convert decimal number to binary
$BCDNumber = bindec($binaryNumber); // convert binary number to BCD

echo $BCDNumber; // output the BCD number