The pi() function Returns the value of Pi (π).
pi()
NA
The pi() function Returns the approximate value of PI. This value is a floating point value.
3.1415926535898
<?php echo(pi()); ?>
3.1415926535898
Let us see another example to get the value of PI
<?php echo M_PI; ?>
3.1415926535898