log10()

Anonymous contributor's avatar
Anonymous contributor
Anonymous contributor's avatar
Anonymous contributor
Published Jun 26, 2023
Contribute to Docs

The log10() function returns the base-10 logarithm of a number.

Syntax

log10($arg);

The function accepts a single parameter, $arg, which represents the number to calculate the base-10 logarithm for.

Codebyte Example

The following codebyte example uses the log10() function to return the base-10 logarithm of 100, then it outputs the result using echo:

us
Visit us
code
Hide code
Code
Output
Hide output
Hide output
Loading...

All contributors

Looking to contribute?

Learn PHP on Codecademy