CodeExplorer DivisionByZeroError example
return self::
inArray($left,
$right);
case '+':
return $left +
$right;
case '-':
return $left -
$right;
case '~':
return $left.
$right;
case '*':
return $left *
$right;
case '/':
if (0 ==
$right) { throw new \
DivisionByZeroError('Division by zero.'
);
} return $left /
$right;
case '%':
if (0 ==
$right) { throw new \
DivisionByZeroError('Modulo by zero.'
);
} return $left %
$right;
case 'matches':
return $this->
evaluateMatches($right,
$left);
}