3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $mypi = 3.1415926535897932384626433832795028841971; $pi = pi(); printf("pi: %.24f, %.24f, %.24f\n", $pi, $mypi, M_PI); $l = strlen($mypi); echo "l: $l\n"; $d = pack("d", $mypi); $l = strlen($d); echo "l: $l\n"; printf("%.24g\n", end(unpack("d", $d)));
based on GY0hL
Output for 7.0.0 - 7.1.0
pi: 3.141592653589793115997963, 3.141592653589793115997963, 3.141592653589793115997963 l: 15 l: 8 Notice: Only variables should be passed by reference in /in/CenIo on line 13 3.14159265358979311599796
Output for hhvm-3.12.0
pi: 3.141592653589800221425321, 3.141592653589793115997963, 3.141592653589800221425321 l: 15 l: 8 3.14159265358979311599796
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.2.1 - 5.6.28
pi: 3.141592653589793115997963, 3.141592653589793115997963, 3.141592653589793115997963 l: 15 l: 8 Strict Standards: Only variables should be passed by reference in /in/CenIo on line 13 3.14159265358979311599796
Output for 5.1.0 - 5.2.0
pi: 3.141592653589793115997963, 3.141592653589793115997963, 3.141592653589793115997963 l: 15 l: 8 Strict Standards: Only variables should be passed by reference in /in/CenIo on line 13
Output for 5.0.5
pi: 3.141592653589793115997963, 3.141592653589793115997963, 3.141592653589793115997963 l: 15 l: 8 Fatal error: Only variables can be passed by reference in /in/CenIo on line 13
Process exited with code 255.
Output for 4.3.0 - 5.0.4
pi: 3.141592653589793115997963, 3.141592653589793115997963, 3.141592653589793115997963 l: 15 l: 8