Easy Tutorial
❮ Func String Strcmp Func Xml Get Error Code ❯

PHP log() Function

PHP Math Reference Manual

Example

Returns the natural logarithm of different numbers:


Definition and Usage

The log() function returns the natural logarithm of a number, or the logarithm of number to the base base.


Syntax

Parameter Description
number Required. Specifies the value to calculate the logarithm for.
base Optional. The base of the logarithm to use. Default is 'e'.

Technical Details

Return Value: The natural logarithm of a number, or the logarithm of number to the base.
Return Type: Float
--- ---
PHP Version: 4+
--- ---
PHP Changelog: PHP 4.3: Added the base parameter.
--- ---

❮ Func String Strcmp Func Xml Get Error Code ❯