Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP log10() Function

PHP log10() Function

PHP Math Reference Manual PHP Math Reference Manual

Example

Return the base-10 logarithm of different numbers:

"); echo(log10(2) . "
"); echo(log10(1) . "
"); echo(log10(0)); ?>

Run Example »


Definition and Usage

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

Syntax

log10(

number

);

Parameters Description
number Required. Specifies the value whose logarithm is to be calculated.

Technical Details

Return Value: number The base-10 logarithm of.
Return Type: Float
PHP Version: 4+

PHP Math Reference Manual PHP Math Reference Manual