# Function for multiplication without using operators for multiplication written in PHP

As mathematic says every operations can be lowered to $x1 + $x2, but I will show multiplication which is really easy to do.

function multiplication($x1, $x2) { $sum = 0; if ($x2 > 0) { for ($i = 0; $i < $x1; $i++) { $sum += $x2; } } return $sum; }