Latest web development tutorials

PHP log10 () function

PHP Math Reference PHP Math Reference

Examples

Returns the number of different numbers to base 10:

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

Running instance »

Definition and Usage

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

grammar

log10( number );

参数 描述
number 必需。规定需计算对数的值。

technical details

return value: number logarithm to the base 10.
Return type: Float
PHP version: 4+


PHP Math Reference PHP Math Reference