PHP log10() - Math Functions

What is log10 Function?

Explanation

The "log10()" function is used to find base-10 logarithm.

Syntax:


log10(x)

In the above syntax "x" is the number for which to find the base-10 logarithm.

Example :


<?php
echo(log10(2) . "<br />");
echo(log10(-1));
?>
Result :

0.301029995664
NAN

In the above example, for negative number the function returns NAN.

PHP Topics


Ask Questions

Ask Question