34,333
edits
Changes
→PHP Arithmetic Operators
<tr style="background:#efefef;">
<th>Operator<th>Type<th>Description<th>Example</th>
<tr>
<td>+<td>Addition<td>Calculates the sum of two operands<td> $total = 10 + 20;
<tr>
<td>-<td>Subtraction<td>Calculates the difference between two operands<td> $total = 10 - 20;
<tr>
<td>*<td>Multiplication<td>Multiplies two operands<td> $total = 10 * 20;
<tr>
<td>/<td>Division<td>Divides two operands<td> $total = 10 / 20;
<tr>
<td>%<td>Modulus<td>Returns the reminader from dividing the first operand by the second<td> $total = 20%10;
<tr>
</table>