Home >>PHP Math Functions >PHP pi() Function
PHP pi() function is used to get the value of PI (3.1415926535898). It doesn’t takes any argument value. It returns the value of the PI. It is similar to the M_PI constant which is also used to get the value of PI.
Syntax:
pi();
Here is an example of pi() function in PHP:
<html> <body> <?php echo pi(); ?> </body> </html>