3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getFormattedNumber($n) { if($n<1000) return $n; $precision = 0; if($n < 1000000) { $m = $n/1000; if(is_float($m) AND $m<99) $precision = 1; var_dump($precision); return round($m, $precision, PHP_ROUND_HALF_DOWN).'K'; } $m = $n/1000000; if(is_float($m) AND $m<99) $precision = 1; var_dump($precision); return round($m, $precision, PHP_ROUND_HALF_DOWN).'M'; } echo getFormattedNumber(25926);

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.0060.00916.75
8.3.50.0130.00722.06
8.3.40.0040.01118.83
8.3.30.0060.00918.71
8.3.20.0000.01518.82
8.3.10.0040.00421.95
8.3.00.0070.00021.75
8.2.180.0170.00318.29
8.2.170.0000.01422.96
8.2.160.0070.00721.92
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00319.82
8.2.120.0050.00326.35
8.2.110.0040.00721.08
8.2.100.0060.00617.71
8.2.90.0030.00519.34
8.2.80.0050.00317.97
8.2.70.0030.00517.60
8.2.60.0000.00818.05
8.2.50.0040.00418.10
8.2.40.0080.00020.59
8.2.30.0000.00821.11
8.2.20.0040.00418.06
8.2.10.0080.00019.96
8.2.00.0050.00217.82
8.1.280.0170.00325.92
8.1.270.0080.00022.14
8.1.260.0040.00428.09
8.1.250.0050.00228.09
8.1.240.0000.00822.86
8.1.230.0040.00822.30
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.38
8.1.190.0030.00617.23
8.1.180.0040.00418.10
8.1.170.0030.00618.78
8.1.160.0000.00822.17
8.1.150.0030.00418.98
8.1.140.0040.00419.64
8.1.130.0040.00417.77
8.1.120.0000.00717.56
8.1.110.0070.00317.42
8.1.100.0030.00417.60
8.1.90.0030.00417.53
8.1.80.0000.00817.46
8.1.70.0040.00417.42
8.1.60.0040.00417.66
8.1.50.0050.00317.58
8.1.40.0000.00817.58
8.1.30.0040.00417.80
8.1.20.0030.00617.75
8.1.10.0000.00817.60
8.1.00.0000.00717.46
8.0.300.0070.00018.77
8.0.290.0050.00316.75
8.0.280.0050.00318.57
8.0.270.0000.00817.33
8.0.260.0000.00617.20
8.0.250.0050.00216.95
8.0.240.0040.00417.04
8.0.230.0040.00417.00
8.0.220.0030.00316.95
8.0.210.0070.00016.95
8.0.200.0000.00716.94
8.0.190.0000.00816.97
8.0.180.0040.00417.01
8.0.170.0040.00417.04
8.0.160.0070.00016.94
8.0.150.0000.00716.77
8.0.140.0070.00016.95
8.0.130.0000.00513.44
8.0.120.0080.00016.88
8.0.110.0030.00616.90
8.0.100.0040.00416.79
8.0.90.0050.00216.89
8.0.80.0090.01217.00
8.0.70.0040.00416.96
8.0.60.0050.00316.96
8.0.50.0080.00016.84
8.0.30.0080.01017.15
8.0.20.0100.01017.40
8.0.10.0050.00316.98
8.0.00.0160.00616.86
7.4.330.0000.00615.55
7.4.320.0070.00016.72
7.4.300.0060.00016.72
7.4.290.0080.00016.61
7.4.280.0040.00416.59
7.4.270.0000.00716.63
7.4.260.0030.00716.59
7.4.250.0000.00816.54
7.4.240.0000.00716.67
7.4.230.0030.00316.69
7.4.220.0120.00816.62
7.4.210.0050.01016.66
7.4.200.0000.00716.40
7.4.160.0100.00616.52
7.4.150.0130.00317.40
7.4.140.0120.00617.86
7.4.130.0100.00716.69
7.4.120.0040.01316.63
7.4.110.0100.01116.60
7.4.100.0150.00916.59
7.4.90.0100.00716.38
7.4.80.0060.01319.39
7.4.70.0130.00316.53
7.4.60.0060.01016.59
7.4.50.0040.01116.75
7.4.40.0100.00716.51
7.4.30.0030.01416.47
7.4.00.0070.01015.02
7.3.330.0030.00413.38
7.3.320.0000.00513.22
7.3.310.0030.00316.46
7.3.300.0030.00316.46
7.3.290.0000.00716.42
7.3.280.0070.00916.42
7.3.270.0060.01217.40
7.3.260.0050.01316.63
7.3.250.0100.00916.58
7.3.240.0100.01216.45
7.3.230.0040.01416.49
7.3.210.0100.00716.73
7.3.200.0060.01016.40
7.3.190.0070.01016.45
7.3.180.0130.00316.44
7.3.170.0110.00616.60
7.3.160.0100.01016.49
7.2.330.0060.01116.74
7.2.320.0150.00916.68
7.2.310.0120.00416.53
7.2.300.0140.00716.86
7.2.290.0110.00916.84
7.2.60.0000.00816.92
7.2.00.0060.00619.52
7.1.200.0000.00815.72
7.1.70.0050.00217.28
7.1.60.0030.01017.27
7.1.00.0000.07722.37
7.0.200.0420.00914.97
7.0.120.0130.05022.05
7.0.110.0130.05722.07
7.0.100.0130.05022.06
7.0.90.0100.05722.08
7.0.80.0100.05722.14
7.0.70.0070.08322.05
7.0.60.0130.05322.00
7.0.50.0030.08022.12
7.0.40.0170.07022.07
7.0.30.0100.05721.98
7.0.20.0230.06022.07
7.0.10.0130.05722.00
7.0.00.0030.06322.14
5.6.270.0070.06020.88
5.6.260.0070.05720.88
5.6.250.0100.05321.08
5.6.240.0170.06721.07
5.6.230.0100.06020.75
5.6.220.0100.07321.02
5.6.210.0070.05720.96
5.6.200.0100.06020.75
5.6.190.0100.07720.86
5.6.180.0070.06720.81
5.6.170.0130.06020.84
5.6.160.0130.05320.84
5.6.150.0130.05321.03
5.6.140.0130.06320.93
5.6.130.0100.06721.00
5.6.120.0170.05321.03
5.6.110.0030.06321.08
5.6.100.0130.05320.94
5.6.90.0100.05720.72
5.6.80.0070.05720.21
5.6.70.0070.05720.44
5.6.60.0070.05720.39
5.6.50.0000.06020.22
5.6.40.0030.05320.29
5.6.30.0130.04720.40
5.6.20.0100.05720.16
5.6.10.0170.04720.42
5.6.00.0030.05720.30

preferences:
53.72 ms | 401 KiB | 5 Q