X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP pi() Function

PHP Math Reference PHP Math Reference

Example

Return 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 is identical to pi().


Syntax

pi();

Technical Details

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


PHP Math Reference PHP Math Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook