The irrational mathematical constant of Pi can be obtained a few different ways in PHP. There is a function to give you the value as well as a bunch of constants that represent Pi as well as fractions of Pi and it’s square root. Heck, you could even do it the old fashioned way:

But that doesn’t make much sense when there’s so many built-ins. To obtain the value of Pi with PHP’s built in function is easy (and logically named ;):

But why use a function when you could simply reference a constant? I mean, Pi is a constant already, so for me this makes the most sense:

Then for fractions and square roots of pi we can utilize these: