3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inp= "12.345kk"; $number = 0; if (preg_match('/^([\d.]+)([kt]+)/', $inp, $matches)) { $number = $matches[1]; $multipliers = $matches[2]; $number *= 1000 ** strlen($multipliers); } echo $number;

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.70.0090.00618.43
8.3.60.0040.01116.50
8.3.50.0070.01116.71
8.3.40.0140.00019.42
8.3.30.0090.00619.13
8.3.20.0080.00024.18
8.3.10.0080.00024.66
8.3.00.0080.00026.16
8.2.190.0130.00616.75
8.2.180.0140.00725.92
8.2.170.0100.00722.96
8.2.160.0140.00422.96
8.2.150.0000.00725.66
8.2.140.0030.00524.66
8.2.130.0020.00526.16
8.2.120.0050.00321.13
8.2.110.0060.00321.13
8.2.100.0040.00817.97
8.2.90.0080.00017.88
8.2.80.0080.00019.03
8.2.70.0000.00817.93
8.2.60.0060.00318.05
8.2.50.0060.00318.07
8.2.40.0050.00318.22
8.2.30.0030.00618.29
8.2.20.0000.00918.09
8.2.10.0000.00819.46
8.2.00.0030.00319.40
8.1.280.0170.00025.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0110.00022.18
8.1.230.0060.00621.04
8.1.220.0060.00318.68
8.1.210.0050.00320.77
8.1.200.0080.00017.48
8.1.190.0000.00817.48
8.1.180.0040.00418.10
8.1.170.0000.00818.81
8.1.160.0040.00418.96
8.1.150.0070.00018.97
8.1.140.0000.00718.90
8.1.130.0080.00020.17
8.1.120.0040.00417.52
8.1.110.0030.00517.44
8.1.100.0050.00317.59
8.1.90.0000.00717.50
8.1.80.0080.00017.46
8.1.70.0000.01017.43
8.1.60.0050.00317.64
8.1.50.0040.00417.61
8.1.40.0000.00917.60
8.1.30.0100.00017.79
8.1.20.0040.00417.58
8.1.10.0000.00917.72
8.1.00.0000.00817.70
8.0.300.0000.00720.04
8.0.290.0000.00816.75
8.0.280.0000.00718.47
8.0.270.0000.00718.21
8.0.260.0030.00318.36
8.0.250.0040.00417.14
8.0.240.0040.00416.98
8.0.230.0030.00317.12
8.0.220.0040.00417.06
8.0.210.0000.00817.10
8.0.200.0000.00717.02
8.0.190.0040.00417.04
8.0.180.0050.00317.07
8.0.170.0000.01017.11
8.0.160.0040.00417.04
8.0.150.0000.00816.87
8.0.140.0000.00816.99
8.0.130.0030.00313.40
8.0.120.0030.00516.93
8.0.110.0000.00716.95
8.0.100.0050.00216.99
8.0.90.0060.00317.02
8.0.80.0120.00616.99
8.0.70.0030.00516.93
8.0.60.0050.00216.91
8.0.50.0000.00817.15
8.0.30.0160.00417.45
8.0.20.0110.00817.14
8.0.10.0000.00717.11
8.0.00.0130.00516.89
7.4.330.0000.00515.55
7.4.320.0060.00016.87
7.4.300.0030.00316.79
7.4.290.0040.00416.82
7.4.280.0070.00016.82
7.4.270.0000.00916.58
7.4.260.0000.00813.47
7.4.250.0070.00016.79
7.4.240.0020.00516.73
7.4.230.0030.00316.58
7.4.220.0020.00516.86
7.4.210.0080.00816.82
7.4.200.0040.00416.84
7.4.130.0070.01116.70
7.4.120.0070.01416.93
7.4.110.0320.01116.77
7.4.100.0120.00816.68
7.4.90.0140.01016.76
7.4.80.0130.00419.39
7.4.70.0120.01016.66
7.4.60.0090.00616.68
7.4.50.0080.01216.67
7.4.40.0090.00816.46
7.4.30.0160.00316.64
7.4.20.0090.00616.46
7.4.10.0070.01016.58
7.4.00.0130.00816.69
7.3.330.0000.00716.44
7.3.320.0030.00313.28
7.3.310.0070.00016.53
7.3.300.0000.00716.48
7.3.290.0070.01016.50
7.3.260.0160.00616.54
7.3.240.0080.00816.51
7.3.230.0080.00816.50
7.3.210.0130.00316.66
7.3.200.0070.01016.49
7.3.190.0100.00716.86
7.3.180.0060.01116.54
7.3.170.0110.00716.68
7.3.160.0120.00816.51
7.3.150.0100.01016.58
7.3.140.0120.00416.78
7.3.130.0070.01316.77
7.3.120.0120.00816.59
7.3.110.0110.00916.80
7.3.100.0130.00716.64
7.3.90.0030.01216.46
7.3.80.0080.00916.73
7.3.70.0080.00816.54
7.3.60.0100.00716.49
7.3.50.0030.01416.39
7.3.40.0080.00816.58
7.3.30.0090.00616.61
7.3.20.0440.01016.61
7.3.10.0100.00716.62
7.3.00.0130.00316.57
7.2.330.0120.00616.84
7.2.320.0160.00616.64
7.2.310.0060.01216.66
7.2.300.0100.00816.64
7.2.290.0090.01116.70
7.2.280.0060.01016.98
7.2.270.0100.00616.82
7.2.260.0040.01516.58
7.2.250.0110.00916.63
7.2.240.0030.01316.70
7.2.230.0140.00316.86
7.2.220.0070.01016.77
7.2.210.0090.00916.89
7.2.200.0100.00716.68
7.2.190.0180.00016.63
7.2.180.0060.00916.96
7.2.170.0050.01316.68
7.2.160.0150.00316.82
7.2.150.0140.00316.78
7.2.140.0040.01416.75
7.2.130.0170.00016.65
7.2.120.0080.00916.72
7.2.110.0040.01216.59
7.2.100.0110.00816.74
7.2.90.0070.01016.70
7.2.80.0070.01016.90
7.2.70.0030.01516.63
7.2.60.0120.00616.76
7.2.50.0110.00716.64
7.2.40.0070.01016.86
7.2.30.0040.01416.76
7.2.20.0070.01016.71
7.2.10.0080.00816.71
7.2.00.0100.00716.59

preferences:
63.19 ms | 401 KiB | 5 Q