log10()

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:

Code
Output
Loading...

All contributors

Contribute to Docs

Learn PHP on Codecademy