integer
and float
values to perform arithmetical operations.
Let's define two variables:
number1
and number2
and perform these operations$number1 = 40;
$number2 = 9;
Addition
echo $number1 + $number2 . "\n";
Subtraction
echo $number1 - $number2 . "\n";
Multiplication
echo $number1 * $number2 . "\n";
Division
echo $number1 / $number2 . "\n";
Modulus
echo $number1 % $number2 . "\n";