 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
pi() function in PHP
The pi() function Returns the value of Pi (π).
Syntax
pi()
Parameters
- NA 
Return
The pi() function Returns the approximate value of PI. This value is a floating point value.
3.1415926535898
Example
<?php echo(pi()); ?>
Output
3.1415926535898
Example
Let us see another example to get the value of PI
<?php echo M_PI; ?>
Output
3.1415926535898
Advertisements
 