3v4l.org

run code in 300+ PHP versions simultaneously
<?php function float_strval($fltValue) { $strValue = (string)$fltValue; if (preg_match("/E[\+\-]\d+$/", $strValue)) { $strValue = number_format($fltValue, 16, '.', ''); } $oldStrValue = number_format($fltValue, 16, '.', ''); return ['in'=>$fltValue, 'out'=>$strValue, 'old'=>$oldStrValue]; } print_r(float_strval(0.00000021)); print_r(float_strval(1209381092380198230.123)); print_r(float_strval(90.05));

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.0120.00618.70
8.3.50.0040.01518.09
8.3.40.0090.00619.10
8.3.30.0120.00419.17
8.3.20.0040.00418.82
8.3.10.0040.00423.46
8.3.00.0000.00819.11
8.2.180.0180.00316.72
8.2.170.0140.00422.96
8.2.160.0090.00620.22
8.2.150.0000.00824.18
8.2.140.0060.00324.66
8.2.130.0050.00326.16
8.2.120.0070.00022.15
8.2.110.0100.00021.02
8.2.100.0060.00618.09
8.2.90.0000.00818.15
8.2.80.0030.00717.97
8.2.70.0060.00317.88
8.2.60.0110.00017.91
8.2.50.0040.00418.07
8.2.40.0080.00020.13
8.2.30.0000.00818.12
8.2.20.0030.00517.88
8.2.10.0000.00718.25
8.2.00.0040.00418.27
8.1.280.0180.00425.92
8.1.270.0000.00820.38
8.1.260.0000.00726.35
8.1.250.0030.00628.09
8.1.240.0100.01022.78
8.1.230.0040.00820.97
8.1.220.0000.00917.78
8.1.210.0030.00518.96
8.1.200.0060.00317.48
8.1.190.0030.00617.25
8.1.180.0060.00318.10
8.1.170.0030.00620.55
8.1.160.0000.00821.95
8.1.150.0030.00518.97
8.1.140.0050.00317.68
8.1.130.0030.00318.02
8.1.120.0050.00317.68
8.1.110.0000.00817.50
8.1.100.0000.00717.52
8.1.90.0050.00217.52
8.1.80.0030.00317.66
8.1.70.0070.00017.59
8.1.60.0040.00417.80
8.1.50.0040.00417.75
8.1.40.0040.00417.79
8.1.30.0040.00417.76
8.1.20.0050.00217.85
8.1.10.0040.00417.61
8.1.00.0000.00817.66
8.0.300.0050.00319.92
8.0.290.0080.00016.75
8.0.280.0030.00318.52
8.0.270.0030.00317.33
8.0.260.0020.00517.19
8.0.250.0040.00417.14
8.0.240.0040.00417.04
8.0.230.0030.00417.06
8.0.220.0000.00717.10
8.0.210.0030.00517.02
8.0.200.0030.00316.99
8.0.190.0040.00417.00
8.0.180.0040.00417.07
8.0.170.0030.00516.94
8.0.160.0080.00016.99
8.0.150.0000.00716.95
8.0.140.0050.00217.05
8.0.130.0000.00613.49
8.0.120.0050.00317.06
8.0.110.0000.00916.94
8.0.100.0050.00317.07
8.0.90.0070.00017.07
8.0.80.0090.01217.15
8.0.70.0080.00017.05
8.0.60.0070.00017.06
8.0.50.0040.00416.89
8.0.30.0030.01517.26
8.0.20.0080.01417.43
8.0.10.0050.00317.24
8.0.00.0120.00716.91
7.4.330.0030.00315.12
7.4.320.0000.00616.86
7.4.300.0000.00616.90
7.4.290.0000.00716.88
7.4.280.0080.00016.85
7.4.270.0040.00416.84
7.4.260.0030.00316.82
7.4.250.0040.00416.75
7.4.240.0030.00416.92
7.4.230.0070.00017.05
7.4.220.0060.01416.96
7.4.210.0100.01016.91
7.4.200.0070.00016.95
7.4.160.0070.01016.71
7.4.150.0150.00317.40
7.4.140.0120.00817.86
7.4.130.0080.01216.68
7.4.120.0110.00616.78
7.4.110.0110.00716.79
7.4.100.0040.01716.70
7.4.90.0110.00716.77
7.4.80.0040.01819.39
7.4.70.0130.01016.86
7.4.60.0030.01316.88
7.4.50.0030.00616.36
7.4.40.0060.01116.82
7.4.30.0040.01516.80
7.4.00.0100.00714.96
7.3.330.0000.00513.52
7.3.320.0000.00613.57
7.3.310.0040.00416.42
7.3.300.0070.00016.56
7.3.290.0000.00716.54
7.3.280.0090.01016.60
7.3.270.0030.01417.40
7.3.260.0110.00516.48
7.3.250.0120.00616.68
7.3.240.0120.00916.48
7.3.230.0080.01116.63
7.3.210.0130.00316.81
7.3.200.0130.00319.39
7.3.190.0070.01316.83
7.3.180.0070.01116.96
7.3.170.0150.00716.75
7.3.160.0100.00716.73
7.2.330.0040.01416.79
7.2.320.0120.00616.82
7.2.310.0070.01016.70
7.2.300.0090.00916.93
7.2.290.0150.00916.92
7.2.60.0030.01317.03
7.2.00.0040.00719.33
7.1.200.0030.01316.11
7.1.100.0200.01017.98
7.1.70.0090.00317.14
7.1.60.0070.01419.48
7.1.50.0060.01817.16
7.1.00.0070.07322.55
7.0.200.0030.00517.03
7.0.60.0070.05019.97
7.0.50.0030.04317.77
7.0.40.0070.09320.22
7.0.30.0270.04320.08
7.0.20.0200.08720.34
7.0.10.0100.08320.09
7.0.00.0070.05020.10
5.6.280.0030.07021.11
5.6.210.0070.05320.75
5.6.200.0070.06718.18
5.6.190.0070.08020.77
5.6.180.0230.07720.64
5.6.170.0430.06720.61
5.6.160.0030.04020.40
5.6.150.0070.05718.24
5.6.140.0000.06318.23
5.6.130.0100.04318.20
5.6.120.0100.06721.01
5.6.110.0130.06020.97
5.6.100.0130.07721.11
5.6.90.0200.05721.00
5.6.80.0070.05720.39
5.5.350.0030.08320.43
5.5.340.0070.08318.02
5.5.330.0130.03320.42
5.5.320.0400.07720.48
5.5.310.0300.07320.30
5.5.300.0070.07018.04
5.5.290.0030.05717.96
5.5.280.0200.06720.80
5.5.270.0030.04020.95
5.5.260.0000.04320.79
5.5.250.0170.07320.68
5.5.240.0230.05320.15
5.4.450.0730.04719.47
5.4.440.0170.06019.45
5.4.430.0970.05019.54
5.4.420.0130.05319.47
5.4.410.0100.05319.36
5.4.400.0200.04319.23
5.4.390.0100.05319.13
5.4.380.0100.05019.27
5.4.370.0170.06719.04
5.4.360.0070.07019.19
5.4.350.0170.05719.16
5.4.340.0100.05019.13
5.4.320.0100.05719.02
5.4.310.0170.04719.11
5.4.300.0070.05719.04
5.4.290.0100.05319.00
5.4.280.0170.04719.13
5.4.270.0100.05319.07
5.4.260.0130.05319.12
5.4.250.0100.05319.12
5.4.240.0070.05719.08
5.4.230.0070.05319.29
5.4.220.0100.05319.14
5.4.210.0170.04719.03
5.4.200.0070.05316.97
5.4.190.0070.05319.03
5.4.180.0130.05019.11
5.4.170.0100.05319.04
5.4.160.0070.05319.11
5.4.150.0100.05319.09
5.4.140.0170.04716.64
5.4.130.0130.04716.52
5.4.120.0100.05016.58
5.4.110.0030.05316.38
5.4.100.0130.05016.32
5.4.90.0100.05316.46
5.4.80.0130.04716.44
5.4.70.0070.05716.51
5.4.60.0030.05716.57
5.4.50.0130.04716.59
5.4.40.0200.06716.38
5.4.30.0070.05016.37
5.4.20.0170.04716.37
5.4.10.0170.04016.59
5.4.00.0130.06015.88
5.3.290.0070.06014.57
5.3.280.0030.07014.74
5.3.270.0130.05314.46
5.3.260.0130.05014.76
5.3.250.0100.05714.46
5.3.240.0100.05314.75
5.3.230.0100.05314.76
5.3.220.0070.05714.71
5.3.210.0170.05014.73
5.3.200.0030.06014.71
5.3.190.0130.05014.68
5.3.180.0100.06014.57
5.3.170.0130.06314.58
5.3.160.0070.05314.49
5.3.150.0100.05314.49
5.3.140.0030.05714.60
5.3.130.0100.05314.56
5.3.120.0130.05314.54
5.3.110.0070.05714.56
5.3.100.0100.05014.09
5.3.90.0070.05314.04
5.3.80.0100.04714.00
5.3.70.0030.05313.88
5.3.60.0100.04714.18
5.3.50.0130.04313.96
5.3.40.0100.05014.02
5.3.30.0100.04714.07
5.3.20.0030.05313.80
5.3.10.0030.05313.66
5.3.00.0100.05013.61
5.2.170.0070.04311.16
5.2.160.0070.04011.06
5.2.150.0030.04711.00
5.2.140.0130.04011.13
5.2.130.0100.04011.25
5.2.120.0070.04011.04
5.2.110.0000.04711.06
5.2.100.0000.04711.18
5.2.90.0100.03711.24
5.2.80.0130.03311.05
5.2.70.0070.04011.02
5.2.60.0000.04711.03
5.2.50.0070.04311.09
5.2.40.0000.04710.90
5.2.30.0070.04010.93
5.2.20.0130.03010.96
5.2.10.0000.04310.90
5.2.00.0070.04010.66
5.1.60.0070.0309.99
5.1.50.0070.0339.92
5.1.40.0070.03310.08
5.1.30.0030.04010.41
5.1.20.0070.03710.26
5.1.10.0100.03310.11
5.1.00.0130.0309.92
5.0.50.0030.0308.47
5.0.40.0000.0308.30
5.0.30.0070.0408.14
5.0.20.0030.0278.13
5.0.10.0030.0278.17
5.0.00.0070.0408.01
4.4.90.0070.0205.77
4.4.80.0000.0235.87
4.4.70.0030.0205.74
4.4.60.0000.0275.88
4.4.50.0000.0235.75
4.4.40.0000.0435.86
4.4.30.0070.0175.75
4.4.20.0030.0205.81
4.4.10.0030.0235.93
4.4.00.0030.0335.86
4.3.110.0000.0235.79
4.3.100.0070.0235.71
4.3.90.0070.0175.82
4.3.80.0000.0375.77
4.3.70.0000.0275.80
4.3.60.0000.0275.81
4.3.50.0030.0275.65
4.3.40.0030.0335.63
4.3.30.0030.0234.44
4.3.20.0030.0274.48
4.3.10.0030.0204.46
4.3.00.0000.01316.00

preferences:
60.92 ms | 400 KiB | 5 Q