PHP pi() function
Definition and Usage
The pi() function returns the value of pi.
Syntax
pi()
Description
Returns an approximate value of pi. The float precision of the returned value is determined by the precision command in php.ini. The default value is 14. You can also use the M_PI constant, which produces the same result as pi().
Example
<?php echo pi(); ?>
Output similar to:
3.14159265359