3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $mypi = 3.1415926535897932384626433832795028841971; $pi = pi(); printf("pi: %.24f, %.24f, %.24f\n", $pi, $mypi, M_PI);
based on njZRl
Output for 7.2.0
Warning: Use of undefined constant  M_PI - assumed ' M_PI' (this will throw an Error in a future version of PHP) in /in/i0kA4 on line 4 pi: 3.141592653589793115997963, 3.141592653589793115997963, 0.000000000000000000000000
Output for 4.3.0 - 7.1.10
Notice: Use of undefined constant  M_PI - assumed ' M_PI' in /in/i0kA4 on line 4 pi: 3.141592653589793115997963, 3.141592653589793115997963, 0.000000000000000000000000