FREE Web Template Download
HTML CSS JAVASCRIPT SQL PHP BOOTSTRAP JQUERY ANGULARJS TUTORIALS REFERENCES EXAMPLES Blog
 

PHP pi() Function

PHP Math Reference PHP Math Reference

Example

Return the value of PI:

<?php
echo(pi());
?>
Run example »

Definition and Usage

The pi() function returns the value of PI.

Tip: The named constant M_PI is identical to pi().


Syntax

pi();

Technical Details

Return Value: 3.1415926535898
Return Type: Float
PHP Version: 4+

PHP Math Reference PHP Math Reference