(1) Arithmetic Operators 1: learning objectives, understanding operators, and modulo operations, and writing expressions. Take a deeper look at the previous knowledge about variable types. There are various types of dynamic computation in PHP. First, let's take a look at the Arithmetic Operators +-*/% that we can best understand. <? PHP $ A = 10; $ B = 0; echo $ A/$ B; // The divisor cannot be 0. $ A indicates the divisor. $ B indicates the divisor. Echo $ A + $ B; // print 10; $ A = 3200000000; $ B = 3200000000; $ c = $ A + $ B; var_dump ($ C ); // print out Why float 6.4 billion is float? The maximum integer value is about 2 billion. The float type will be interpreted if it is larger than more than 2 billion. The maximum value can be expressed by the constant php_int_max. Baidu can look at the reasons. You can understand it here.?> // Modulo <? PHP $ A = 10; // try-10; $ B = 2; // try-2; observe the print result echo $ A % $ B; // The '%' symbol is a modulo operator (remainder) in PHP and the result is 0. The positive and negative number of the modulus result is determined by the positive and negative values of the divisor. ?> Let's talk about the modulo operation. If the divisor is smaller than the divisor, for example, 3% 9, the modulo operation is 3. 9% 3 first, we calculate that Division 9/3 = 3 does not have a remainder, so the value is 0. If it is 9% 4 ?? First, calculate the last Division 2 2*4 = 8 and leave 1. Therefore, the modulo value is 1. These are just some simple mathematical operations. A little bit. You can pass.
4. Operator (1) Arithmetic Operator