Home  >  Article  >  Backend Development  >  算术操作符_PHP

算术操作符_PHP

WBOY
WBOYOriginal
2016-06-01 12:39:51849browse

这些工作和基本的学校里教的内容相似。

Table 7-1. Arithmetic Operators(表7-1算术操作符)

example name result
$a + $b Addition Sum of $a and $b.?/FONT>
$a - $b Subtraction Remainder of $b subtracted from $a.?/FONT>
$a * $b Multiplication Product of $a and $b.?/FONT>
$a / $b Division Dividend of $a and $b.?/FONT>
$a % $b Modulus Remainder of $a divided by $b.

其中,除法操作符“/”返回一个整数值(整数除法的结果)如果两个操作数是整数(或者是被转化成整数的字符串)的话。如果任意一个操作数是浮点数,那么将进行浮点运算。


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn