PHP log10

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PHP : log10() function

Description

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

Version

(PHP 4 and above)

Syntax

log10(num)

Parameter

Name

Description

Required /
Optional

Type

num

The argument to process.

Required

Float

 

Return value

The base-10 logarithm of num.

Value Type : Float.

Example :

  1. echo(log10(2) . "
    ");  

  2. echo(log10(1.234) . "
    ");  

  3. echo(log10(0) . "
    ");  

  4. echo(log10(1) . "
    ");  

  5. ?>  

Output :

0.301029995664
0.0913151596972
-INF
0