3v4l.org

run code in 300+ PHP versions simultaneously
<?php function hash2($n) { for ($i = 0; $i < $n; $i++) { $hash1["foo_$i"] = $i; $hash2["foo_$i"] = 0; } for ($i = $n; $i > 0; $i--) { foreach($hash1 as $key => $value) { $hash2[$key] += $value; } } $first = "foo_0"; $last = "foo_".($n-1); print "{$hash1[$first]} {$hash1[$last]} {$hash2[$first]} {$hash2[$last]}\n"; } hash2(1000);

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.04018.30
8.3.50.0130.04921.39
8.3.40.0100.04718.95
8.3.30.0070.03720.43
8.3.20.0030.02020.46
8.3.10.0000.02422.10
8.3.00.0070.01722.44
8.2.180.0100.03416.63
8.2.170.0070.03922.96
8.2.160.0070.03722.20
8.2.150.0070.01724.18
8.2.140.0100.01424.66
8.2.130.0000.02326.16
8.2.120.0070.03920.82
8.2.110.0000.04322.25
8.2.100.0030.04118.03
8.2.90.0060.03219.41
8.2.80.0060.02519.39
8.2.70.0000.04217.88
8.2.60.0040.03518.05
8.2.50.0040.03518.07
8.2.40.0030.03318.34
8.2.30.0070.02719.65
8.2.20.0000.03917.75
8.2.10.0030.03717.93
8.2.00.0000.03917.77
8.1.280.0130.04025.92
8.1.270.0030.02123.99
8.1.260.0070.01726.35
8.1.250.0000.02328.09
8.1.240.0000.04323.84
8.1.230.0040.03519.01
8.1.220.0060.03517.74
8.1.210.0030.03418.77
8.1.200.0030.03817.48
8.1.190.0040.03817.55
8.1.180.0030.03219.00
8.1.170.0030.02918.68
8.1.160.0100.03220.68
8.1.150.0030.03618.86
8.1.140.0040.03617.56
8.1.130.0040.02817.94
8.1.120.0000.03717.55
8.1.110.0030.03317.63
8.1.100.0030.03717.51
8.1.90.0060.03217.54
8.1.80.0030.03117.65
8.1.70.0000.04017.57
8.1.60.0040.04017.70
8.1.50.0030.03717.69
8.1.40.0060.03517.71
8.1.30.0000.04217.76
8.1.20.0030.03817.78
8.1.10.0000.04217.70
8.1.00.0000.04217.61
8.0.300.0000.03218.77
8.0.290.0040.03217.29
8.0.280.0030.03318.61
8.0.270.0000.03517.40
8.0.260.0000.03316.97
8.0.250.0030.03116.98
8.0.240.0070.03017.19
8.0.230.0030.03116.99
8.0.220.0000.03516.93
8.0.210.0000.03617.00
8.0.200.0030.03217.13
8.0.190.0060.04516.99
8.0.180.0000.04317.02
8.0.170.0030.04016.96
8.0.160.0000.04316.98
8.0.150.0030.04017.07
8.0.140.0000.04316.89
8.0.130.0030.03913.54
8.0.120.0030.04016.92
8.0.110.0030.03917.07
8.0.100.0070.03517.05
8.0.90.0030.03916.93
8.0.80.0000.07317.02
8.0.70.0030.04017.08
8.0.60.0000.04316.83
8.0.50.0000.04417.02
8.0.30.0070.05217.04
8.0.20.0130.06617.44
8.0.10.0030.03917.05
8.0.00.0160.05716.76
7.4.330.0030.03515.00
7.4.320.0000.03616.57
7.4.300.0060.03116.68
7.4.290.0000.04116.56
7.4.280.0070.03816.71
7.4.270.0030.03816.69
7.4.260.0040.03613.35
7.4.250.0030.03916.69
7.4.240.0030.03816.73
7.4.230.0000.04116.64
7.4.220.0100.05916.70
7.4.210.0040.06916.79
7.4.200.0030.03816.85
7.4.190.0030.04216.71
7.4.160.0170.04016.60
7.4.150.0090.05217.40
7.4.140.0100.04917.86
7.4.130.0090.05016.63
7.4.120.0080.06516.63
7.4.110.0120.04716.56
7.4.100.0100.04816.61
7.4.90.0100.05916.47
7.4.80.0110.05019.39
7.4.70.0100.05016.69
7.4.60.0120.04916.58
7.4.50.0030.05016.46
7.4.40.0070.04722.77
7.4.30.0130.04616.73
7.4.00.0130.04814.94
7.3.330.0070.03313.52
7.3.320.0000.04113.44
7.3.310.0060.03516.52
7.3.300.0000.04116.47
7.3.290.0000.06216.43
7.3.280.0080.05916.51
7.3.270.0100.05017.40
7.3.260.0160.06516.78
7.3.250.0080.05216.62
7.3.240.0030.05916.51
7.3.230.0100.04916.69
7.3.210.0090.05616.52
7.3.200.0130.04519.39
7.3.190.0030.05916.72
7.3.180.0030.05316.80
7.3.170.0030.06316.74
7.3.160.0130.04916.65
7.3.120.0050.05515.13
7.3.110.0160.05315.13
7.3.100.0100.05515.22
7.3.90.0060.05415.05
7.3.80.0070.04414.89
7.3.70.0030.04815.15
7.3.60.0100.04414.74
7.3.50.0100.04115.07
7.3.40.0030.04214.88
7.3.30.0030.05115.18
7.3.20.0100.06116.69
7.3.10.0060.05416.64
7.3.00.0030.05616.76
7.2.330.0190.05116.64
7.2.320.0100.06216.89
7.2.310.0060.10016.88
7.2.300.0060.06016.89
7.2.290.0070.06216.96
7.2.250.0070.05815.13
7.2.240.0030.06715.01
7.2.230.0100.07315.07
7.2.220.0100.06415.32
7.2.210.0000.06315.41
7.2.200.0100.06915.35
7.2.190.0030.05415.13
7.2.180.0070.06014.96
7.2.170.0030.05315.23
7.2.130.0000.06016.59
7.2.120.0100.06716.88
7.2.110.0070.05617.04
7.2.100.0030.05716.95
7.2.90.0030.05416.75
7.2.80.0030.06216.81
7.2.70.0070.05617.10
7.2.60.0030.05816.77
7.2.50.0130.05517.15
7.2.40.0000.06317.10
7.2.30.0030.06017.03
7.2.20.0070.05316.74
7.2.10.0030.06316.74
7.2.00.0030.05618.20
7.1.330.0070.07515.77
7.1.320.0030.07915.84
7.1.310.0030.10415.93
7.1.300.0030.08315.69
7.1.290.0070.08215.75
7.1.280.0030.08616.00
7.1.270.0100.07515.66
7.1.260.0030.07515.62
7.1.250.0100.07615.78
7.1.240.0100.08016.01
7.1.230.0000.08915.79
7.1.220.0100.07615.85
7.1.210.0000.08415.49
7.1.200.0100.06215.77
7.1.190.0030.07415.70
7.1.180.0070.07715.67
7.1.170.0100.08315.85
7.1.160.0000.08315.64
7.1.150.0070.08515.83
7.1.140.0100.07415.54
7.1.130.0030.07815.66
7.1.120.0000.07915.98
7.1.110.0030.08315.89
7.1.100.0030.07317.00
7.1.90.0030.07815.98
7.1.80.0000.08915.67
7.1.70.0050.07016.19
7.1.60.0070.08417.59
7.1.50.0030.09216.31
7.1.40.0000.08715.81
7.1.30.0030.08115.79
7.1.20.0130.07115.68
7.1.10.0070.07915.88
7.1.00.0080.09418.94
7.0.330.0030.09815.25
7.0.320.0060.08715.43
7.0.310.0030.08115.45
7.0.300.0030.08415.40
7.0.290.0030.08815.10
7.0.280.0100.08415.28
7.0.270.0000.08915.27
7.0.260.0070.08015.29
7.0.250.0060.08415.13
7.0.240.0030.09115.36
7.0.230.0070.08215.44
7.0.220.0030.08615.58
7.0.210.0070.07815.48
7.0.200.0030.07016.17
7.0.190.0000.08515.48
7.0.180.0030.08515.38
7.0.170.0030.08115.25
7.0.160.0070.08915.47
7.0.150.0030.08515.28
7.0.140.0000.11518.68
7.0.130.0100.08315.38
7.0.120.0030.09215.32
7.0.110.0130.08115.32
7.0.100.0120.10517.71
7.0.90.0080.10717.71
7.0.80.0020.09317.77
7.0.70.0050.09617.68
7.0.60.0070.11717.68
7.0.50.0120.10817.97
7.0.40.0050.10916.79
7.0.30.0050.11016.71
7.0.20.0050.11216.61
7.0.10.0120.10816.78
7.0.00.0050.10916.66
5.6.380.0030.18814.97
5.6.370.0000.19814.87
5.6.360.0030.19514.68
5.6.350.0000.19714.86
5.6.340.0070.19114.69
5.6.330.0000.19814.61
5.6.320.0030.21214.61
5.6.310.0070.19214.56
5.6.300.0070.19014.79
5.6.290.0000.19414.48
5.6.280.0030.19917.94
5.6.270.0000.19514.72
5.6.260.0030.19214.86
5.6.250.0030.18517.74
5.6.240.0050.18817.78
5.6.230.0100.18617.82
5.6.220.0080.18617.77
5.6.210.0030.19217.73
5.6.200.0030.17018.00
5.6.190.0050.20118.00
5.6.180.0080.19417.90
5.6.170.0070.16218.00
5.6.160.0100.19117.92
5.6.150.0070.19518.04
5.6.140.0080.19117.90
5.6.130.0020.19317.88
5.6.120.0080.20217.93
5.6.110.0130.17417.87
5.6.100.0080.19217.85
5.6.90.0120.19018.01
5.6.80.0050.15717.78
5.6.70.0030.16417.61
5.6.60.0020.18717.75
5.6.50.0050.16117.65
5.6.40.0030.16317.60
5.6.30.0020.16717.76
5.6.20.0030.15617.62
5.6.10.0150.15017.56
5.6.00.0070.14817.64
5.5.380.0070.18016.04
5.5.370.0100.18616.04
5.5.360.0120.19316.08
5.5.350.0030.19315.94
5.5.340.0120.19416.21
5.5.330.0080.20916.38
5.5.320.0130.18116.39
5.5.310.0070.21316.31
5.5.300.0080.16816.33
5.5.290.0030.19216.49
5.5.280.0070.19616.54
5.5.270.0020.20216.45
5.5.260.0070.19916.26
5.5.250.0030.19516.13
5.5.240.0070.18416.00
5.5.230.0070.15915.90
5.5.220.0150.15015.78
5.5.210.0070.17715.96
5.5.200.0050.17515.88
5.5.190.0070.15815.96
5.5.180.0050.15415.94
5.5.170.0030.19011.39
5.5.160.0050.19016.12
5.5.150.0050.17415.79
5.5.140.0030.15515.84
5.5.130.0020.16715.91
5.5.120.0020.16015.87
5.5.110.0030.15815.81
5.5.100.0000.17215.93
5.5.90.0070.16115.89
5.5.80.0020.15416.00
5.5.70.0030.16215.96
5.5.60.0030.17615.92
5.5.50.0030.19015.99
5.5.40.0080.18115.82
5.5.30.0050.19215.93
5.5.20.0070.17515.76
5.5.10.0030.18415.80
5.5.00.0070.17015.92
5.4.450.0030.21715.54
5.4.440.0070.19215.46
5.4.430.0050.17015.54
5.4.420.0030.19415.55
5.4.410.0030.19315.46
5.4.400.0050.16615.37
5.4.390.0050.16015.20
5.4.380.0000.17615.31
5.4.370.0020.16915.34
5.4.360.0030.18915.18
5.4.350.0050.18115.21
5.4.340.0080.18715.21
5.4.330.0030.19711.39
5.4.320.0020.15515.21
5.4.310.0020.16315.11
5.4.300.0020.17115.38
5.4.290.0030.15615.28
5.4.280.0020.16215.20
5.4.270.0070.16615.42
5.4.260.0050.17315.21
5.4.250.0030.17215.36
5.4.240.0100.16515.38
5.4.230.0070.18215.26
5.4.220.0030.19115.22
5.4.210.0070.20315.28
5.4.200.0050.19015.24
5.4.190.0120.18915.35
5.4.180.0080.19115.36
5.4.170.0050.19215.32
5.4.160.0050.20315.21
5.4.150.0080.19215.26
5.4.140.0050.17013.96
5.4.130.0030.19313.92
5.4.120.0100.19214.00
5.4.110.0130.19413.96
5.4.100.0030.18013.90
5.4.90.0050.18613.99
5.4.80.0020.18614.02
5.4.70.0080.19314.03
5.4.60.0030.18813.98
5.4.50.0020.21214.04
5.4.40.0080.18713.96
5.4.30.0030.18614.05
5.4.20.0070.18414.02
5.4.10.0050.17613.89
5.4.00.0050.19213.79
5.3.290.0070.16413.06
5.3.280.0080.16812.88
5.3.270.0070.19412.97
5.3.260.0080.19112.96
5.3.250.0030.21112.92
5.3.240.0080.19812.86
5.3.230.0030.20212.90
5.3.220.0030.21012.82
5.3.210.0020.20812.91
5.3.200.0020.19812.79
5.3.190.0050.18812.90
5.3.180.0070.18712.86
5.3.170.0120.19812.83
5.3.160.0070.19412.90
5.3.150.0030.17212.74
5.3.140.0030.20312.88
5.3.130.0030.21712.85
5.3.120.0100.20912.89
5.3.110.0080.20512.89
5.3.100.0100.18112.70
5.3.90.0080.18412.59
5.3.80.0070.18712.44
5.3.70.0080.20512.61
5.3.60.0080.19112.55
5.3.50.0050.17912.63
5.3.40.0030.19412.59
5.3.30.0070.20112.56
5.3.20.0050.21312.42
5.3.10.0020.21012.30
5.3.00.0020.21812.25
5.2.170.0030.22010.73
5.2.160.0020.23810.71
5.2.150.0070.22410.66
5.2.140.0030.22710.48
5.2.130.0050.22910.62
5.2.120.0020.21510.56
5.2.110.0030.21010.56
5.2.100.0070.21510.58
5.2.90.0050.22910.51
5.2.80.0000.22410.52
5.2.70.0080.21110.31
5.2.60.0080.21610.48
5.2.50.0030.23010.54
5.2.40.0000.23510.38
5.2.30.0100.20810.49
5.2.20.0080.20710.37
5.2.10.0030.22510.35
5.2.00.0030.22310.15
5.1.60.0030.2179.67
5.1.50.0050.2309.69
5.1.40.0050.2129.75
5.1.30.0050.2209.74
5.1.20.0030.2149.86
5.1.10.0020.2229.74
5.1.00.0070.2179.62
5.0.50.0050.6309.43
5.0.40.0020.6029.43
5.0.30.0030.5939.43
5.0.20.0000.5919.43
5.0.10.0030.6009.43
5.0.00.0020.6169.43
4.4.90.0020.6019.43
4.4.80.0020.5729.43
4.4.70.0030.5829.43
4.4.60.0030.5859.43
4.4.50.0020.5709.43
4.4.40.0030.5849.43
4.4.30.0030.5729.43
4.4.20.0030.5759.43
4.4.10.0020.5659.43
4.4.00.0000.5979.43
4.3.110.0020.5619.43
4.3.100.0020.5479.43
4.3.90.0000.5749.43
4.3.80.0020.5839.43
4.3.70.0050.5929.43
4.3.60.0020.5889.43
4.3.50.0020.6209.43
4.3.40.0000.6019.43
4.3.30.0030.5909.43
4.3.20.0030.5809.43
4.3.10.0020.5859.43
4.3.00.0020.6019.43

preferences:
44.58 ms | 401 KiB | 5 Q