017 PHP Operators - Arithmetic Operator

in php •  7 years ago 

PHP Operators - Arithmatic Operators

In this lesson "PHP Operators - Arithmatic Operators ", I discussed about Arithmatic Operators in PHP.

Just remember basic Arithmatics that you used to do in your School. The same operations can be performed in PHP using Arithmetic Operators. The Arithmetic Operators are used with numeric values to perform common arithmetical operations, such as addition, subtraction, multiplication etc.

The division operator ("/") returns a float value unless the two operands are integers (or strings that get converted to integers) and the numbers are evenly divisible, in which case an integer value will be returned. For integer division, see intdiv().

Operands of modulo are converted to integers (by stripping the decimal part) before processing. For floating-point modulo, see fmod().

The result of the modulo operator % has the same sign as the dividend — that is, the result of $a % $b will have the same sign as $a

PHP Operators | Operators in PHP | Arithmetic Operator

If you have any specific question, please feel free to ask in comment section.


Subscribe: If you like the video, please subscribe to the channel
https://www.youtube.com/channel/UC54qZs5I_kgCYJT4uwowKag?sub_confirmation=1


Click Thumbs Up if you liked the video


Contact: [email protected] for training inquiries.


Thank you for watching "PHP Operators - Arithmetic Operators"

PHP Operators | Operators in PHP | Arithmetic Operator | PHP Arithmetic Operator

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!