3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 20000; class ValueObject {} $time = microtime(true); $items = array(); for ($i = 0; $i < $count; $i++) { $items[] = new ValueObject(); } $spentTime = microtime(true) - $time; echo number_format($spentTime, 3) . ' seconds';

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)
7.2.00.0110.00020.97
7.1.70.0000.01018.86
7.1.60.0070.02119.46
7.1.50.0120.01618.70
7.1.00.0000.08324.45
7.0.200.0030.01018.73
7.0.140.0100.07024.07
7.0.110.0030.04321.99
7.0.100.0030.04322.04
7.0.90.0070.04021.95
7.0.80.0070.04322.13
7.0.70.0070.03722.07
7.0.60.0900.05322.05
7.0.50.0400.04322.05
7.0.40.0030.04319.69
7.0.30.0070.04019.75
7.0.20.0000.04719.74
7.0.10.0070.04019.86
7.0.00.0000.04319.78
5.6.280.0100.07725.73
5.6.260.0030.05025.33
5.6.250.0070.03325.50
5.6.240.0100.04325.49
5.6.230.0100.04325.41
5.6.220.0170.03025.47
5.6.210.0070.06725.38
5.6.200.0070.08325.67
5.6.190.0000.05025.67
5.6.180.0100.04025.37
5.6.170.0100.04025.41
5.6.160.0070.04325.29
5.6.150.0000.05025.38
5.6.140.0100.04025.37
5.6.130.0100.04025.35
5.6.120.0230.02325.37
5.6.110.0070.05325.43
5.6.100.0100.03325.39
5.6.90.0030.05025.50
5.6.80.0000.04724.91
5.6.70.0030.03724.75
5.6.60.0000.05024.79
5.6.50.0070.03724.74
5.6.40.0100.07024.73
5.6.30.0100.07724.74
5.6.20.0100.07324.73
5.6.10.0100.06724.64
5.6.00.0130.03324.64
5.5.380.0000.05022.79
5.5.370.0030.04722.78
5.5.360.0000.04022.75
5.5.350.0070.04722.63
5.5.340.0000.09323.02
5.5.330.0030.04723.20
5.5.320.0030.04723.06
5.5.310.0030.04723.00
5.5.300.0030.04723.23
5.5.290.0130.03722.93
5.5.280.0030.04723.01
5.5.270.0000.05023.21
5.5.260.0000.05722.98
5.5.250.0000.04322.86
5.5.240.0030.03722.55
5.5.230.0070.03722.34
5.5.220.0130.03022.41
5.5.210.0000.04022.51
5.5.200.0070.06022.58
5.5.190.0100.04022.58
5.5.180.0030.07322.41
5.5.160.0070.07722.35
5.5.150.0070.06022.41
5.5.140.0070.07722.59
5.5.130.0070.04022.48
5.5.120.0070.08322.38
5.5.110.0070.09022.57
5.5.100.0100.08322.23
5.5.90.0100.07322.38
5.5.80.0100.06722.41
5.5.70.0030.08022.27
5.5.60.0070.09022.27
5.5.50.0100.07322.50
5.5.40.0070.04022.38
5.5.30.0000.05022.34
5.5.20.0030.07322.37
5.5.10.0070.04022.40
5.5.00.0030.09322.24
5.4.450.0000.05024.40
5.4.440.0070.04324.40
5.4.430.0030.06324.39
5.4.420.0070.03324.71
5.4.410.0070.03324.41
5.4.400.0000.04024.13
5.4.390.0070.03324.20
5.4.380.0070.03324.16
5.4.370.0030.03724.19
5.4.360.0070.05724.00
5.4.350.0100.07724.09
5.4.340.0070.04024.40
5.4.320.0030.08724.22
5.4.310.0000.04724.39
5.4.300.0070.08024.06
5.4.290.0170.06724.08
5.4.280.0130.05324.19
5.4.270.0030.08324.12
5.4.260.0030.08024.22
5.4.250.0030.05724.08
5.4.240.0030.06724.12
5.4.230.0100.07024.09
5.4.220.0130.08024.08
5.4.210.0100.04324.27
5.4.200.0030.06024.05
5.4.190.0100.07024.03
5.4.180.0070.05324.21
5.4.170.0030.07724.17
5.4.160.0000.05724.01
5.4.150.0070.04324.14
5.4.140.0070.03721.48
5.4.130.0100.07721.44
5.4.120.0170.07021.46
5.4.110.0070.06321.54
5.4.100.0130.04321.63
5.4.90.0130.07321.58
5.4.80.0070.04321.49
5.4.70.0000.05321.50
5.4.60.0070.04321.48
5.4.50.0100.05321.71
5.4.40.0070.05021.59
5.4.30.0100.08721.45
5.4.20.0000.08321.54
5.4.10.0100.07721.38
5.4.00.0130.08720.91
5.3.290.0030.07722.75
5.3.280.0100.08322.93
5.3.270.0170.07022.80
5.3.260.0130.08322.87
5.3.250.0130.04322.86
5.3.240.0030.09322.79
5.3.230.0170.05022.63
5.3.220.0070.08022.84
5.3.210.0130.06022.82
5.3.200.0070.10322.82
5.3.190.0100.08022.73
5.3.180.0070.07722.82
5.3.170.0130.05022.64
5.3.160.0030.05022.76
5.3.150.0100.06022.60
5.3.140.0200.06722.72
5.3.130.0070.07322.81
5.3.120.0170.08022.96
5.3.110.0070.05022.97
5.3.100.0030.09722.37
5.3.90.0170.08322.27
5.3.80.0100.06022.09
5.3.70.0130.06721.98
5.3.60.0130.04722.12
5.3.50.0170.07722.14
5.3.40.0100.05722.02
5.3.30.0130.07722.06
5.3.20.0100.06021.74
5.3.10.0130.08321.75
5.3.00.0100.05021.75
5.2.170.0100.06318.43
5.2.160.0170.03318.47
5.2.150.0030.05718.46
5.2.140.0070.07718.43
5.2.130.0100.06718.45
5.2.120.0070.07318.42
5.2.110.0100.05718.39
5.2.100.0100.06718.38
5.2.90.0030.03318.39
5.2.80.0030.04318.66
5.2.70.0030.08018.35
5.2.60.0070.05018.62
5.2.50.0070.06718.43
5.2.40.0100.04718.15
5.2.30.0000.04718.12
5.2.20.0100.07718.41
5.2.10.0000.08018.18
5.2.00.0100.04318.05
5.1.60.0130.06719.75
5.1.50.0000.03319.48
5.1.40.0070.07719.47
5.1.30.0130.06319.71
5.1.20.0000.04319.73
5.1.10.0100.04019.56
5.1.00.0170.06319.49
5.0.50.0070.03018.16
5.0.40.0070.05317.88
5.0.30.0070.04717.70
5.0.20.0100.06017.67
5.0.10.0000.06317.65
5.0.00.0170.07017.62
4.4.90.0000.03313.41
4.4.80.0100.04713.33
4.4.70.0070.04713.41
4.4.60.0100.02313.27
4.4.50.0030.04013.41
4.4.40.0030.06013.33
4.4.30.0000.03313.36
4.4.20.0000.02713.57
4.4.10.0130.04013.32
4.4.00.0000.03313.30
4.3.110.0100.03713.36
4.3.100.0030.02313.18
4.3.90.0030.05313.15
4.3.80.0030.04713.23
4.3.70.0070.04013.22
4.3.60.0000.02713.15
4.3.50.0000.03013.32
4.3.40.0030.03713.09
4.3.30.0000.02312.07
4.3.20.0070.03712.07
4.3.10.0030.03012.07
4.3.00.0070.04312.07

preferences:
47.66 ms | 401 KiB | 5 Q