Javatpoint Logo
Javatpoint Logo

PHP log10() Function

The log10() function is predefined php math function. It is used to returns the base-10 logarithm of a number.

Syntax:

Parameter Description Required/Optional
Number Specifies the value to calculate the logarithm. Required

Note: num is the input number with Base fixed base 10.

Example1

Output:

Your number is: 5
By using log10() function your number is : 1.6094379124341

Example2

Output:

Your number is: 1.234
By using log10() function your number is : 0.2102609254832

Example3

Output:

Your number is: 1
By using log10() function your number is : 0

Example4

Output:

Your number is: 0
By using log10() function your number is : -INF

Example5

Output:

Your number is: -1
By using log10() function your number is : NAN

Next TopicPHP Math





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA