PHP pi()Function

PHP Math 参考手册PHP Math Reference Manual

Examples

Returns 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 and pi() produce the same result.


Syntax

pi();

Technical Details

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


PHP Math 参考手册PHP Math Reference Manual Other Extensions