Search w3schools.com:

SHARE THIS PAGE

PHP pi() Function


PHP Math Reference Complete PHP Math Reference

Definition and Usage

The pi() function returns the value of PI.

Syntax

pi()


Tips and Notes

Tip: The named constant M_PI, yields identical results to pi().


Example

<?php
echo pi();
?>

The output of the code above will be:

3.14159265359


PHP Math Reference Complete PHP Math Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]