3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number = 13000000; // Here's the function function formatter ($number) { $bil = floor ($number / 1000000000); $millions = $number % 1000000000; $mil = floor ($millions / 1000000); $thousands = $millions % 1000000; $thou = floor ($thousands / 1000); $str = ''; if ($bil != 0) { $str .= "{$bil} billions "; } if ($mil != 0) { $str .= "{$mil} millions "; } if ($thou != 0) { $str .= "{$thou} thousands "; } return $str; } echo $str;

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.0100.00718.30
8.3.50.0180.00822.82
8.3.40.0140.00018.80
8.3.30.0140.00018.94
8.3.20.0080.00020.00
8.3.10.0040.00421.78
8.3.00.0040.00419.67
8.2.180.0040.01116.75
8.2.170.0080.00622.96
8.2.160.0070.00720.11
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00419.79
8.2.110.0090.00022.08
8.2.100.0120.00017.59
8.2.90.0030.00619.18
8.2.80.0000.00817.97
8.2.70.0080.00017.50
8.2.60.0080.00418.04
8.2.50.0030.00618.07
8.2.40.0000.00918.16
8.2.30.0040.00417.94
8.2.20.0080.00017.62
8.2.10.0000.00718.02
8.2.00.0000.00917.66
8.1.280.0040.01125.92
8.1.270.0090.00023.80
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0040.00423.95
8.1.230.0070.00419.16
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0000.00917.23
8.1.190.0030.00517.10
8.1.180.0040.00418.10
8.1.170.0040.00418.50
8.1.160.0040.00421.96
8.1.150.0040.00418.80
8.1.140.0040.00417.43
8.1.130.0000.00719.60
8.1.120.0030.00517.43
8.1.110.0000.00817.41
8.1.100.0040.00417.29
8.1.90.0000.00717.35
8.1.80.0040.00417.32
8.1.70.0000.00717.35
8.1.60.0050.00217.52
8.1.50.0000.00817.46
8.1.40.0000.00717.44
8.1.30.0000.00817.47
8.1.20.0000.00817.43
8.1.10.0040.00417.37
8.1.00.0000.00717.52
8.0.300.0040.00418.77
8.0.290.0070.00016.63
8.0.280.0040.00418.45
8.0.270.0000.00717.15
8.0.260.0030.00318.49
8.0.250.0000.00717.04
8.0.240.0000.00816.91
8.0.230.0040.00416.94
8.0.220.0030.00316.90
8.0.210.0000.00716.82
8.0.200.0000.00616.82
8.0.190.0000.00716.82
8.0.180.0070.00016.86
8.0.170.0040.00416.98
8.0.160.0000.01016.89
8.0.150.0030.00316.85
8.0.140.0040.00416.69
8.0.130.0030.00313.35
8.0.120.0000.00916.82
8.0.110.0080.00016.79
8.0.100.0020.00516.79
8.0.90.0050.00216.90
8.0.80.0060.00916.92
8.0.70.0070.00016.92
8.0.60.0000.00717.01
8.0.50.0040.00416.79
8.0.30.0070.01116.97
8.0.20.0080.01117.40
8.0.10.0040.00416.89
8.0.00.0070.01116.49
7.4.330.0000.00515.08
7.4.320.0000.00716.37
7.4.300.0080.00316.54
7.4.290.0030.00316.45
7.4.280.0000.00716.46
7.4.270.0000.00716.35
7.4.260.0030.00316.52
7.4.250.0040.00416.31
7.4.240.0020.00516.52
7.4.230.0070.00016.19
7.4.220.0120.00616.47
7.4.210.0090.00616.42
7.4.200.0000.00716.56
7.4.160.0180.00416.47
7.4.150.0030.01617.40
7.4.140.0140.00617.86
7.4.130.0100.00716.52
7.4.120.0110.01316.46
7.4.110.0140.00416.59
7.4.100.0140.00316.23
7.4.90.0130.00616.50
7.4.80.0110.00719.39
7.4.70.0070.01016.49
7.4.60.0170.00416.41
7.4.50.0000.00516.49
7.4.40.0130.00316.42
7.4.30.0120.00916.68
7.4.00.0040.01115.03
7.3.330.0000.00713.30
7.3.320.0000.00613.25
7.3.310.0000.00716.43
7.3.300.0070.00016.18
7.3.290.0120.00816.27
7.3.280.0070.01016.36
7.3.270.0090.00917.40
7.3.260.0060.01016.47
7.3.250.0110.00816.42
7.3.240.0120.00616.25
7.3.230.0120.00616.40
7.3.210.0130.00316.23
7.3.200.0140.00419.39
7.3.190.0180.00016.64
7.3.180.0030.01316.39
7.3.170.0060.01616.27
7.3.160.0070.01016.46
7.2.330.0070.01116.64
7.2.320.0140.00516.66
7.2.310.0130.01016.47
7.2.300.0090.00916.59
7.2.290.0100.00716.38
7.2.00.0100.01019.18
7.1.100.0850.00415.90
7.1.70.0030.00517.18
7.1.60.0060.01819.40
7.1.50.0130.01016.52
7.1.00.0030.07722.28
7.0.200.0000.01016.85
7.0.140.0000.07722.06
7.0.60.0100.05320.02
7.0.50.0030.08317.83
7.0.40.0100.09020.13
7.0.30.0700.05720.19
7.0.20.0300.07320.20
7.0.10.0100.06020.24
7.0.00.0000.04320.25
5.6.280.0030.07320.92
5.6.210.0000.07020.67
5.6.200.0030.06318.28
5.6.190.0070.05720.55
5.6.180.0630.05020.39
5.6.170.0230.08020.48
5.6.160.0000.04320.55
5.6.150.0070.05018.19
5.6.140.0000.08718.18
5.6.130.0070.04018.11
5.6.120.0130.04020.95
5.6.110.0100.08021.12
5.6.100.0100.06721.01
5.6.90.0070.08321.02
5.6.80.0100.03720.51
5.5.350.3130.03320.31
5.5.340.0130.04018.04
5.5.330.0070.08720.13
5.5.320.0400.04320.27
5.5.310.0300.07320.36
5.5.300.0100.03718.01
5.5.290.0000.04317.98
5.5.280.0270.04020.80
5.5.270.0100.07020.80
5.5.260.0030.09020.96
5.5.250.0100.05320.62
5.5.240.0130.08020.29
5.4.450.0570.03719.19
5.4.440.0500.03719.22
5.4.430.0070.05319.16
5.4.420.0300.04319.27
5.4.410.0370.03719.29
5.4.400.0330.03018.98
5.4.390.0200.04719.32
5.4.380.0230.06718.51
5.4.370.0300.05318.60
5.4.360.0270.05318.70
5.4.350.0330.05018.64
5.4.340.0330.06318.73
5.4.320.0050.03812.50
5.4.310.0110.04912.50
5.4.300.0110.05712.51
5.4.290.0090.04712.50
5.4.280.0060.03712.40
5.4.270.0050.03812.40
5.4.260.0080.04512.40
5.4.250.0030.04312.40
5.4.240.0060.03912.40
5.4.230.0070.03812.39
5.4.220.0050.03812.39
5.4.210.0040.04012.39
5.4.200.0040.04012.39
5.4.190.0030.03912.39
5.4.180.0040.03712.38
5.4.170.0060.03812.39
5.4.160.0080.04412.39
5.4.150.0080.03412.38
5.4.140.0090.03412.07
5.4.130.0060.03612.06
5.4.120.0070.03512.02
5.4.110.0060.03512.01
5.4.100.0040.03712.02
5.4.90.0090.03312.01
5.4.80.0070.03612.02
5.4.70.0070.03412.01
5.4.60.0070.03412.01
5.4.50.0070.04712.01
5.4.40.0110.04712.00
5.4.30.0070.04911.99
5.4.20.0060.03912.00
5.4.10.0050.03612.00
5.4.00.0070.03711.48
5.3.290.0070.04312.80
5.3.280.0080.04412.71
5.3.270.0060.04712.73
5.3.260.0070.03812.71
5.3.250.0100.04312.72
5.3.240.0050.03812.71
5.3.230.0030.04012.71
5.3.220.0090.03712.68
5.3.210.0100.03512.68
5.3.200.0110.04612.68
5.3.190.0050.05512.68
5.3.180.0040.04212.67
5.3.170.0050.04412.67
5.3.160.0060.03712.67
5.3.150.0050.03812.67
5.3.140.0040.04412.66
5.3.130.0070.03712.66
5.3.120.0070.04012.66
5.3.110.0070.03812.66
5.3.100.0050.03912.12
5.3.90.0090.03712.10
5.3.80.0070.03812.09
5.3.70.0070.03612.09
5.3.60.0050.04912.08
5.3.50.0050.03912.02
5.3.40.0050.03912.02
5.3.30.0070.03511.98
5.3.20.0030.03811.76
5.3.10.0030.03711.73
5.3.00.0040.03811.73
5.2.170.0050.0319.21
5.2.160.0050.0309.21
5.2.150.0040.0319.22
5.2.140.0070.0289.21
5.2.130.0040.0319.17
5.2.120.0040.0319.17
5.2.110.0060.0279.18
5.2.100.0050.0299.18
5.2.90.0060.0289.18
5.2.80.0070.0349.16
5.2.70.0110.0369.16
5.2.60.0030.0329.13
5.2.50.0080.0399.09
5.2.40.0050.0339.07
5.2.30.0070.0359.05
5.2.20.0080.0259.04
5.2.10.0070.0268.94
5.2.00.0060.0278.80
5.1.60.0040.0248.09
5.1.50.0060.0238.08
5.1.40.0050.0238.06
5.1.30.0060.0258.41
5.1.20.0050.0278.44
5.1.10.0030.0288.16
5.1.00.0040.0268.16
5.0.50.0050.0206.65
5.0.40.0030.0206.51
5.0.30.0030.0326.32
5.0.20.0040.0276.29
5.0.10.0040.0206.27
5.0.00.0030.0316.27
4.4.90.0040.0214.78
4.4.80.0040.0154.76
4.4.70.0020.0174.76
4.4.60.0030.0174.75
4.4.50.0020.0174.77
4.4.40.0060.0234.71
4.4.30.0000.0194.76
4.4.20.0060.0184.84
4.4.10.0030.0174.85
4.4.00.0020.0264.76
4.3.110.0020.0174.67
4.3.100.0020.0154.66
4.3.90.0030.0144.63
4.3.80.0040.0234.58
4.3.70.0030.0144.63
4.3.60.0030.0144.62
4.3.50.0000.0204.63
4.3.40.0020.0254.54
4.3.30.0030.0153.31
4.3.20.0030.0153.29
4.3.10.0020.0163.24
4.3.00.0030.01715.89

preferences:
44.73 ms | 400 KiB | 5 Q