array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.pi.php', 1 => 'pi', ), 'up' => array ( 0 => 'ref.math.php', 1 => 'Math İşlevleri', ), 'prev' => array ( 0 => 'function.octdec.php', 1 => 'octdec', ), 'next' => array ( 0 => 'function.pow.php', 1 => 'pow', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/math/functions/pi.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4, PHP 5, PHP 7, PHP 8)
pi — Get value of pi
Returns an approximation of pi.
Also, you can use the M_PI
constant which yields
identical results to pi().
Bu işlevin bağımsız değişkeni yoktur.
The value of pi as float.
Örnek 1 pi() example
<?php
echo pi(); // 3.1415926535898
echo M_PI; // 3.1415926535898
?>