3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inf = INF; $p = pow(2.,64.); echo bcmod("$inf","$p"),"\n"; echo fmod(INF,pow(2.,64.)),"\n"; echo gmp_mod("$inf","$p"),"\n";
Output for 8.0.2 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught ValueError: bcmod(): Argument #1 ($num1) is not well-formed in /in/12gdf:5 Stack trace: #0 /in/12gdf(5): bcmod('INF', '1.844674407371E...') #1 {main} thrown in /in/12gdf on line 5
Process exited with code 255.
Output for 7.0.5, 7.3.32 - 7.3.33, 7.4.33, 8.0.13
Fatal error: Uncaught Error: Call to undefined function bcmod() in /in/12gdf:5 Stack trace: #0 {main} thrown in /in/12gdf on line 5
Process exited with code 255.
Output for 8.0.0 - 8.0.1
Warning: bcmod(): bcmath function argument is not well-formed in /in/12gdf on line 5 Warning: bcmod(): bcmath function argument is not well-formed in /in/12gdf on line 5 Fatal error: Uncaught DivisionByZeroError: Modulo by zero in /in/12gdf:5 Stack trace: #0 /in/12gdf(5): bcmod('INF', '1.844674407371E...') #1 {main} thrown in /in/12gdf on line 5
Process exited with code 255.
Output for 7.4.0 - 7.4.32
Warning: bcmod(): bcmath function argument is not well-formed in /in/12gdf on line 5 Warning: bcmod(): bcmath function argument is not well-formed in /in/12gdf on line 5 Warning: bcmod(): Division by zero in /in/12gdf on line 5 NAN Warning: gmp_mod(): Unable to convert variable to GMP - string is not an integer in /in/12gdf on line 7
Output for 5.6.8 - 5.6.12, 5.6.16 - 5.6.19, 5.6.28, 7.0.0 - 7.0.4, 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31
Warning: bcmod(): Division by zero in /in/12gdf on line 5 NAN Warning: gmp_mod(): Unable to convert variable to GMP - string is not an integer in /in/12gdf on line 7
Output for 7.0.6
Warning: bcmod(): Division by zero in /in/12gdf on line 5 NAN Fatal error: Uncaught Error: Call to undefined function gmp_mod() in /in/12gdf:7 Stack trace: #0 {main} thrown in /in/12gdf on line 7
Process exited with code 255.
Output for 5.5.35, 5.6.21
Warning: bcmod(): Division by zero in /in/12gdf on line 5 NAN Fatal error: Call to undefined function gmp_mod() in /in/12gdf on line 7
Process exited with code 255.
Output for 5.5.29 - 5.5.30, 5.5.34, 5.6.13 - 5.6.15, 5.6.20
Fatal error: Call to undefined function bcmod() in /in/12gdf on line 5
Process exited with code 255.
Output for 5.5.24 - 5.5.28, 5.5.31 - 5.5.33
Warning: bcmod(): Division by zero in /in/12gdf on line 5 NAN

preferences:
205.06 ms | 402 KiB | 229 Q