w3resource logo


altimage

PHP : pi() function

<<PreviousNext>>

Description

The pi() function is used to get the value of PI.

Version

(PHP 4 and above)

Syntax

pi()

Return value

The value of pi .

Value Type : Float.

Pictorial Presentation

php-math-abc()

Example :

<?php
echo pi()
?> 

Output :

3.1415926535898

View the example in the browser

See also

PHP Function Reference

<<PreviousNext>>

Rate this tutorial


Your Rating: not set

Share this tutorial

RSS Feed