3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'Hexadecimal', \PHP_EOL; try { var_dump(gmp_init('0X')); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { var_dump(gmp_init('0x')); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { var_dump(gmp_init('0X', 16)); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { var_dump(gmp_init('0x', 16)); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } echo 'Binary', \PHP_EOL; try { var_dump(gmp_init('0B')); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { var_dump(gmp_init('0b')); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { var_dump(gmp_init('0B', 2)); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { var_dump(gmp_init('0b', 2)); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } echo "Done\n";

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0110.01118.30
8.3.50.0170.00316.54
8.3.40.0120.00418.67
8.3.30.0040.01118.55
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0030.00626.16
8.2.180.0100.00725.92
8.2.170.0110.00419.19
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0080.00026.35
8.2.110.0000.01020.47
8.2.100.0040.00717.84
8.2.90.0040.00417.75
8.2.80.0080.00019.04
8.2.70.0040.00417.61
8.2.60.0000.00817.93
8.2.50.0050.00318.07
8.2.40.0050.00319.79
8.2.30.0040.00418.03
8.2.20.0070.00018.15
8.2.10.0000.00719.21
8.2.00.0000.00719.23
8.1.280.0060.01225.92
8.1.270.0020.00523.99
8.1.260.0040.00428.09
8.1.250.0050.00328.09
8.1.240.0030.00622.16
8.1.230.0070.00421.97
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0000.00917.35
8.1.190.0030.00517.36
8.1.180.0080.00018.10
8.1.170.0030.00618.68
8.1.160.0070.00018.83
8.1.150.0040.00418.92
8.1.140.0000.00719.05
8.1.130.0040.00417.51
8.1.120.0030.00617.49
8.1.110.0000.00917.52
8.1.100.0000.00717.40
8.1.90.0000.00717.50
8.1.80.0070.00317.39
8.1.70.0030.00317.43
8.1.60.0030.00617.59
8.1.50.0040.00417.51
8.1.40.0000.00817.52
8.1.30.0060.00317.71
8.1.20.0030.00517.71
8.1.10.0040.00417.63
8.1.00.0030.00617.70
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0030.00318.57
8.0.270.0030.00318.11
8.0.260.0030.00317.05
8.0.250.0000.00717.07
8.0.240.0060.00016.95
8.0.230.0070.00017.04
8.0.220.0050.00316.99
8.0.210.0070.00316.91
8.0.200.0030.00317.00
8.0.190.0030.00516.98
8.0.180.0040.00417.02
8.0.170.0040.00817.03
8.0.160.0070.00016.89
8.0.150.0040.00416.91
8.0.140.0080.00016.84
8.0.130.0030.00313.43
8.0.120.0040.00416.84
8.0.110.0000.00717.00
8.0.100.0000.00717.05
8.0.90.0050.00217.11
8.0.80.0050.01116.95
8.0.70.0090.00016.91
8.0.60.0040.00417.00
8.0.50.0000.00817.00
8.0.30.0130.00317.15
8.0.20.0110.00717.20
8.0.10.0000.00817.07
8.0.00.0120.01216.72
7.4.330.0000.00515.55
7.4.320.0030.00316.52
7.4.300.0000.00716.49
7.4.290.0070.00016.71
7.4.280.0030.00616.67
7.4.270.0000.00916.68
7.4.260.0030.00313.27
7.4.250.0040.00416.57
7.4.240.0040.00416.71
7.4.230.0070.00016.41
7.4.220.0050.00216.73
7.4.210.0070.00916.64
7.4.200.0070.00016.71
7.4.130.0030.01416.58
7.4.120.0170.00416.80
7.4.110.0070.01116.63
7.4.100.0130.00616.73
7.4.90.0190.00716.63
7.4.80.0080.01316.64
7.4.70.0050.01116.56
7.4.60.0070.01016.42
7.4.50.0090.00916.52
7.4.40.0150.00316.65
7.4.30.0090.00916.74
7.4.20.0160.00216.66
7.4.10.0110.00616.69
7.4.00.0170.00316.64
7.3.330.0070.00016.59
7.3.320.0060.00013.16
7.3.310.0030.00316.40
7.3.300.0000.00716.39
7.3.290.0100.00516.42
7.3.260.0090.00916.52
7.3.250.0190.00016.55
7.3.240.0070.01016.56
7.3.230.0110.00716.48
7.3.220.0190.00616.41
7.3.210.0130.00416.44
7.3.200.0080.01116.70
7.3.190.0000.01816.48
7.3.180.0130.00616.71
7.3.170.0090.00916.40
7.3.160.0090.00916.61
7.3.150.0030.01416.64
7.3.140.0120.00616.58
7.3.130.0090.00916.56
7.3.120.0150.00316.54
7.3.110.0090.01616.51
7.3.100.0120.00916.51
7.3.90.0130.00316.39
7.3.80.0150.00916.45
7.3.70.0100.01016.46
7.3.60.0120.01116.40
7.3.50.0040.01516.40
7.3.40.0090.01316.57
7.3.30.0120.00416.39
7.3.20.0040.01516.52
7.3.10.0150.00916.65
7.3.00.0130.00616.51

preferences:
58.77 ms | 400 KiB | 5 Q