Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP pi() Function

PHP pi() Function

PHP Math Reference Manual PHP Math Reference Manual

Example

Return the value of PI:

Run Example »


Definition and Usage

The pi() function returns the value of PI.

**Tip:** The named constant M_PI and pi() produce the same result.


Syntax

pi();

Technical Details

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

PHP Math Reference Manual PHP Math Reference Manual