O'Reilly logo

PHP and MySQL Recipes: A Problem-Solution Approach, Second Edition by Frank M. Kromann

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© Frank M. Kromann 2016

Frank M. Kromann, PHP and MySQL Recipes, 10.1007/978-1-4842-0605-8_3

3. Performing Math Operations

Frank M. Kromann

(1)Trabuco Canyon, California, USA

A large number of math functions are built in to the core of PHP and additional functionality is available through extensions including arbitrary precision numbers, statistics, and linear algebra.

The built-in functions cover exponential, logarithmic, trigonometric, hyperbolic functions as well as rounding and random number generators.

PHP supports integer and float data types that can be used to perform the basic math operations: addition (+), subtraction (-), multiplication (*), and division (/). No special functions are needed to perform these actions and the logic can be ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required