Math Functions
Published Apr 20, 2023
Contribute to Docs
PHP has several built-in functions for performing mathematical operations.
A list of PHP math operation functions can be found in the table below:
Math Functions
- abs()
- Returns the absolute value of the argument.
- ceil()
- Returns the next highest integer value of the fractional argument.
- floor()
- Returns a rounded number down to the nearest integer.
- is_nan()
- Checks whether a value is not a number.
- max()
- Finds and returns the highest value in an array or a list of variables.
- pow()
- Returns the number raised to the power of the exponent.
- sin()
- Returns the sine of a given angle.
- tan()
- Returns the tangent of the angle passed as the argument.
Looking to contribute?
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.