9 Mathematical and Date Functions
Mathematical calculations and working with date values often end up in the same pot in programming training courses and books—as they do here—or at least are not far apart. Why? Both are unloved side tasks.
How often do you need a mathematical calculation or a date? More often than you might think. Mathematics is important when generating graphics, for example. Complex figures are rather unpleasant without trigonometric functions. Date values are encountered even more frequently on the web: be it the current date of a news entry, which is automatically generated by PHP, or a counter that counts the days until Christmas.
In the vast number of functions that exist in PHP, there are also many for mathematical calculations ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access