How PHP implements Division

Source: Internet
Author: User
How PHP implements the entire division. What if I only want to get the integer part? Multiple functions are provided in the PHP mathematical function library for PHP to implement division.
Http://www.zhixing123.cn/php/27277.html
If we use the '/' operator to perform division operations, we will get a small value if we cannot perform division operations. What if I only want to get the integer part?
Multiple functions are provided in the PHP mathematical function library:
1. the round function rounds a floating point number.. This should best suit everyone's needs.
  


2. ceil function, which is rounded up by a method.
  


3. floor, the rounding method is used to get the integer, and the fractional part is removed.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.