What is the function "bcmul" used for in PHP and what potential syntax errors can occur when using it?
The function "bcmul" in PHP is used for multiplying two arbitrary precision numbers. One potential syntax error that can occur when using "bcmul" is passing non-numeric values as arguments, which will result in a warning or error. To avoid this, ensure that the arguments passed to "bcmul" are numeric values or can be converted to numeric values.
$num1 = '12345678901234567890';
$num2 = '98765432109876543210';
if (is_numeric($num1) && is_numeric($num2)) {
$result = bcmul($num1, $num2);
echo $result;
} else {
echo "Error: Non-numeric values provided.";
}