Get value of pi
Returns an approximation of pi. Also, you can use the M_PI constant which yields identical results to pi.
M_PI
This function has no parameters.
The value of pi as float.
Example #1 pi example
<?php echo pi(), PHP_EOL; // 3.1415926535898 echo M_PI, PHP_EOL; // 3.1415926535898 ?>