3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = microtime(true); $hash = 0; for ($i = 0; $i < 1000000; $i += 1) { // XOR $hash ^= md5(substr(str_shuffle('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, rand(1,10))); } $time = microtime(true) - $time; echo 'array_diff() took ' . number_format($time, 3) . ' seconds'.PHP_EOL;

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.3.120.0110.00714.69
7.3.110.0060.01514.65
7.3.100.0060.00914.86
7.3.90.0100.01014.78
7.3.80.0080.00514.64
7.3.70.0120.00614.83
7.3.60.0090.00614.70
7.3.50.0030.01814.77
7.3.40.0110.00414.73
7.3.30.0070.01014.65
7.3.20.0080.01516.17
7.3.10.0110.01116.70
7.3.00.0070.01016.24
7.2.240.0000.01814.65
7.2.230.0100.01314.53
7.2.220.0120.00914.84
7.2.210.0030.01714.99
7.2.200.0070.01614.99
7.2.190.0080.01114.92
7.2.180.0100.01014.82
7.2.170.0110.01114.90
7.2.160.0070.00714.85
7.2.150.0100.01017.04
7.2.140.0070.01016.76
7.2.130.0080.01216.78
7.2.120.0060.01016.90
7.2.110.0070.01316.72
7.2.100.0030.01416.90
7.2.90.0100.01016.57
7.2.80.0030.01816.88
7.2.70.0040.01416.57
7.2.60.0170.00716.76
7.2.50.0040.01516.73
7.2.40.0070.01016.68
7.2.30.0100.01016.88
7.2.20.0130.00616.38
7.2.10.0110.00816.95
7.2.00.0050.01318.12
7.1.330.0030.01415.92
7.1.320.0080.00815.82
7.1.310.0030.01715.77
7.1.300.0100.01015.59
7.1.290.0070.01315.84
7.1.280.0120.00915.85
7.1.270.0100.01015.91
7.1.260.0030.02015.64
7.1.250.0070.01715.48
7.1.70.0030.00616.97
7.1.60.0000.01317.23
7.1.50.0230.01634.59
7.1.00.0070.07322.35
7.0.200.0101.00216.80
7.0.140.0031.09322.22
7.0.60.0171.11320.02
7.0.50.0071.13017.89
7.0.40.0131.12020.09
7.0.30.0401.11720.18
7.0.20.0301.18020.00
7.0.10.0031.17020.00
7.0.00.0071.10720.32
5.6.280.0031.50020.78
5.6.210.0031.37320.70
5.6.200.0071.31318.21
5.6.190.0101.27720.57
5.6.180.0301.22020.42
5.6.170.0301.31020.39
5.6.160.0071.35320.55
5.6.150.0031.28318.11
5.6.140.0031.30718.11
5.6.130.0131.30018.21
5.6.120.0031.34321.14
5.6.110.0001.43020.89
5.6.100.0871.35321.11
5.6.90.0131.32020.96
5.6.80.0031.27320.41
5.5.350.0031.30020.43
5.5.340.0031.31718.01
5.5.330.0001.25020.07
5.5.320.0301.48720.18
5.5.310.0301.45320.26
5.5.300.0031.35017.96
5.5.290.0171.53017.91
5.5.280.0071.28720.76
5.5.270.0001.30020.87
5.5.260.0131.32720.86
5.5.250.0101.35320.43
5.5.240.2801.14020.24
5.4.450.0431.48319.55
5.4.440.0471.52719.50
5.4.430.1101.18719.56
5.4.420.0571.57719.16
5.4.410.0302.38019.16
5.4.400.0131.54019.31
5.4.390.0431.60718.80
5.4.380.0172.03018.78
5.4.370.0202.00019.19
5.4.360.0202.12719.21
5.4.350.0072.12019.24
5.4.340.0172.37319.25
5.4.320.0091.43312.46
5.4.310.0081.42212.46
5.4.300.0102.42018.84
5.4.290.0101.83412.46
5.4.280.0071.55112.36
5.4.270.0141.59712.36
5.4.260.0131.78012.36
5.4.250.0071.58612.36
5.4.240.0121.65712.36
5.4.230.0051.66112.35
5.4.220.0121.75912.35
5.4.210.0081.78612.35
5.4.200.0132.45318.94
5.4.190.0071.75412.34
5.4.180.0141.99712.35
5.4.170.0272.06019.13
5.4.160.0061.77212.36
5.4.150.0131.83712.35
5.4.140.0151.79112.04
5.4.130.0051.62312.02
5.4.120.0091.67811.98
5.4.110.0071.97311.98
5.4.100.0121.78211.98
5.4.90.0051.72811.98
5.4.80.0102.00611.98
5.4.70.0091.55111.97
5.4.60.0051.69911.97
5.4.50.0071.54711.97
5.4.40.0071.63511.96
5.4.30.0061.57911.96
5.4.20.0101.61011.96
5.4.10.0051.50811.96
5.4.00.0091.62511.45
5.3.290.0081.62112.80
5.3.280.0272.37014.34
5.3.270.0101.90712.72
5.3.260.0032.45014.39
5.3.250.0402.34714.29
5.3.240.0132.37714.40
5.3.230.0202.38314.38
5.3.220.0172.32714.31
5.3.210.0061.87912.68
5.3.200.0302.20714.34
5.3.190.0111.94012.68
5.3.180.0101.75212.67
5.3.170.0092.00812.66
5.3.160.0091.79812.68
5.3.150.0002.14314.23
5.3.140.0111.90512.66
5.3.130.0171.88014.30
5.3.120.0231.97014.39
5.3.110.0031.93714.27
5.3.100.0102.01713.64
5.3.90.0071.82212.09
5.3.80.0101.51713.74
5.3.70.0171.48313.78
5.3.60.0131.77013.77
5.3.50.0191.90912.00
5.3.40.0002.00313.72
5.3.30.0131.64911.95
5.3.20.0131.89111.73
5.3.10.0061.69911.70
5.3.00.0041.69911.69
5.2.170.0091.8249.22
5.2.160.0301.76310.89
5.2.150.0071.7019.22
5.2.140.0031.78310.93
5.2.130.0032.21710.88
5.2.120.0121.8139.18
5.2.110.0191.9049.19
5.2.100.0051.7219.19
5.2.90.0071.8559.18
5.2.80.0232.30311.21
5.2.70.0061.9869.18
5.2.60.0071.8569.13
5.2.50.0131.8649.11
5.2.40.0132.39310.74
5.2.30.0102.43010.66
5.2.20.0132.43310.76
5.2.10.0102.42710.65
5.2.00.0072.43010.54
5.1.60.0102.4479.82
5.1.50.0172.4309.83
5.1.40.0172.4279.72
5.1.30.0172.45710.13
5.1.20.0302.40710.13
5.1.10.0102.4339.86
5.1.00.0302.3939.83
5.0.50.0172.3808.29
5.0.40.0302.4408.13
5.0.30.0102.4278.08
5.0.20.0132.4238.08
5.0.10.0272.4108.08
5.0.00.0132.4208.08
4.4.90.0302.3878.08
4.4.80.0202.4138.08
4.4.70.0072.4538.08
4.4.60.0002.4508.08
4.4.50.0072.4478.08
4.4.40.0102.4178.08
4.4.30.0032.4338.08
4.4.20.0102.4438.08
4.4.10.0272.4108.08
4.4.00.0202.4178.08
4.3.110.0332.4278.08
4.3.100.0102.4338.08
4.3.90.0032.4308.08
4.3.80.0032.4538.08
4.3.70.0172.4308.08
4.3.60.0072.4338.08
4.3.50.0132.4278.08
4.3.40.0102.4738.08
4.3.30.0102.4078.08
4.3.20.0102.4238.08
4.3.10.0102.4008.08
4.3.00.0072.3938.08

preferences:
36.84 ms | 401 KiB | 5 Q