Math Functions
abs, sqrt, pow, max, min, pi, round and random_int help with numbers.
Example
echo abs(-5), " ", sqrt(16), " ", pow(2, 8), " ", max(1, 9, 3), " ", round(pi(), 3), "\n";
echo random_int(5, 5);Result
5 4 256 9 3.142 5
Exercise
Square root.
(16)Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.