The pi() function returns the value of PI.
The named constant M_PI is identical to pi().
PHP pi() Function has the following syntax.
pi();
None
Item | Description |
---|---|
Return Value | 3.1415926535898 |
Return Type | Float |
Return the value of PI:
<?php
echo(pi());
?>
The code above generates the following result.