3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text = "685484585478488466"; printf("Integer: %d\n", (integer) $text);printf("Float: %f\n", (float) $text); echo "\n"; echo gmp_strval((integer) $text); echo "\n"; echo gmp_strval((float) $text);
based on ZETvo
Output for 5.4.34 - 5.5.34, 5.6.8 - 5.6.20, 5.6.28, 7.0.0 - 7.0.5, 7.0.14 - 7.1.0
Integer: 685484585478488466 Float: 685484585478488448.000000 685484585478488466 Warning: gmp_strval(): Unable to convert variable to GMP - wrong type in /in/tAVTO on line 8
Output for 7.0.6
Integer: 685484585478488466 Float: 685484585478488448.000000 Fatal error: Uncaught Error: Call to undefined function gmp_strval() in /in/tAVTO:6 Stack trace: #0 {main} thrown in /in/tAVTO on line 6
Process exited with code 255.
Output for hhvm-3.10.0 - 3.12.0
Integer: 685484585478488466 Float: 685484585478488448.000000 685484585478488466 685484585478488448
Output for 5.2.1 - 5.4.32, 5.5.35, 5.6.21
Integer: 685484585478488466 Float: 685484585478488448.000000 Fatal error: Call to undefined function gmp_strval() in /in/tAVTO on line 6
Process exited with code 255.
Output for 5.0.0 - 5.2.0
Integer: 685484585478488466 Float: 685484585478488500.000000 Fatal error: Call to undefined function gmp_strval() in /in/tAVTO on line 6
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Integer: 685484585478488466 Float: 685484585478488500.000000 Fatal error: Call to undefined function: gmp_strval() in /in/tAVTO on line 6
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Integer: 685484585478488466 Float: 685484585478488500.000000 Fatal error: Call to undefined function: gmp_strval() in /in/tAVTO on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Integer: 685484585478488466 Float: 685484585478488500.000000 Fatal error: Call to undefined function: gmp_strval() in /in/tAVTO on line 6