PHP log10()Functions

PHP Math 参考手册PHP Math Reference Manual

Examples

Returns the base-10 logarithm of different numbers:

<?php
echo(log10(2.7183) . "<br>");
echo(log10(2) . "<br>");
echo(log10(1) . "<br>");
echo(log10(0));
?>

Run example »

Definition and Usage

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

Syntax

log10(number);

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

Technical Details

Return value: numberthe base-10 logarithm of.
Return type: Float
PHP version: 4+


PHP Math 参考手册PHP Math Reference Manual Other Extensions