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("%.24f\n", hex2dec($d));
based on 03AEg
Output for 7.0.0 - 7.1.0
pi: 3.141592653589793115997963, 3.141592653589793115997963, 3.141592653589793115997963 l: 15 l: 8 Fatal error: Uncaught Error: Call to undefined function hex2dec() in /in/tRKMP:13 Stack trace: #0 {main} thrown in /in/tRKMP on line 13
Process exited with code 255.
Output for 5.0.0 - 5.6.28
pi: 3.141592653589793115997963, 3.141592653589793115997963, 3.141592653589793115997963 l: 15 l: 8 Fatal error: Call to undefined function hex2dec() in /in/tRKMP on line 13
Process exited with code 255.
Output for 4.4.5 - 4.4.9
pi: 3.141592653589793115997963, 3.141592653589793115997963, 3.141592653589793115997963 l: 15 l: 8 Fatal error: Call to undefined function: hex2dec() in /in/tRKMP on line 13
Process exited with code 255.
Output for 4.3.2 - 4.4.4
pi: 3.141592653589793115997963, 3.141592653589793115997963, 3.141592653589793115997963 l: 15 l: 8 Fatal error: Call to undefined function: hex2dec() in /in/tRKMP on line 13
Process exited with code 255.
Output for 4.3.0 - 4.3.1
pi: 3.141592653589793115997963, 3.141592653589793115997963, 3.141592653589793115997963 l: 15 l: 8 Fatal error: Call to undefined function: hex2dec() in /in/tRKMP on line 13