Return the base-10 logarithm of different numbers in PHP

Description

The following code shows how to return the base-10 logarithm of different numbers.

Example


  /*  w w w . j  av  a2s .  com*/
<?php
    echo(log10(2.7183) . "<br>");
    echo(log10(2) . "<br>");
    echo(log10(1) . "<br>");
    echo(log10(0));
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions