PHP exp() Function

❮ PHP Math Reference

Example

Return 'E' raised to the power of different numbers:

<?php
echo(exp(0) . "<br>");
echo(exp(1) . "<br>");
echo(exp(10) . "<br>");
echo(exp(4.8));
?>
Try it Yourself »

Definition and Usage

The exp() function returns E raised to the power of x (Ex).

'E' is the base of the natural system of logarithms (approximately 2.718282) and x is the number passed to it.


Syntax

exp(x);

Parameter Values

Parameter Description
x Required. Specifies the exponent

Technical Details

Return Value: 'E' raised to the power of x
Return Type: Float
PHP Version: 4+

❮ PHP Math Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.