- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
log10() function in PHP
The log10() function Return the base-10 logarithm of a number.
Syntax
log10(num)
Parameters
num − The value to calculate the logarithm for.
Return
The log10() function Returns base 10 logarithm of a number.
Example
<?php echo(log10(1)); ?>
Output
0
Example
Let us see another example −
<?php echo(log10(0)); ?>
Output
-INF
Example
Let us see another example −
<?php echo(log10(10)); echo(log10(2.7)); ?>
Output
10.43136376415899
Advertisements