Return the natural logarithm of different numbers in PHP

Description

The following code shows how to return the natural logarithm of different numbers.

Example


  //w w w  . ja  va 2  s. c  om
<?php
    echo(log(2.7183) . "<br>");
    echo(log(2) . "<br>");
    echo(log(1) . "<br>");
    echo(log(0));
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




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