PHP exp() Function

Definition and Usage

The exp() function calculates the exponent of e.

Syntax

exp(x)
Parameter Description
x Required. A number.

Description

Returns e's x Power value...

Tips and Comments

Tip:Use 'e' as the base of the natural logarithm 2.718282.

Example

In this example, we will apply the exp() function to different numbers:

<?php
echo(exp(1));
echo(exp(-1));
echo(exp(5));
echo(exp(10))
?>

Output:

2.718281828459045
0.36787944117144233
148.4131591025766
22026.465794806718