PHP math and money
Calculate a change in temperature, pack boxes, or round a bill.
Everyday arithmetic and rounding
- absIn PHP, abs returns the magnitude of a number.
- ceilIn PHP, ceil rounds toward positive infinity.
- floorIn PHP, floor rounds toward negative infinity.
- intdivSplit quantities into whole packs and a remainder
- maxKeep enough seats for a booking
- minCap a voucher at the total due
- roundDisplay a delivery estimate in minutes
Powers, roots, and logarithms
- expCheck the baseline of a growth model
- expm1Recover a small percentage increase
- logMeasure the continuous growth needed to double
- log10Count orders of magnitude in a reading
- log1pConvert a small growth rate accurately
- powProject repeated doubling
- sqrtFind the side of a square garden
Angles and distances
- acosRecover the angle of an awning arm
- asinRecover a ladder angle from its height
- atanTurn a ramp slope into an angle
- atan2Find a direction on a map
- cosFind the horizontal reach of an awning
- coshEstimate the shape of a hanging cable
- deg2radConvert a half turn into radians
- hypotMeasure the diagonal of a screen
- rad2degLabel a quarter turn in degrees
- sinFind the vertical share of a ladder
- sinhEstimate the slope of a hanging cable
- tanCalculate rise per metre of horizontal run
- tanhSmooth a strong sensor signal