3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $j=500000; while($i < 60000) { $i++; $j++; $data1[] = md5($i); $data2[] = md5($j); } $time = microtime(true); echo "Starting array_diff\n"; $data_diff1 = array_diff($data1, $data2); $time = microtime(true) - $time; echo 'array_diff() took ' . number_format($time, 3) . ' seconds and returned ' . count($data_diff1) . " entries\n";

Abusive script

This script was stopped while abusing our resources

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.4.40.0200.06931.34
7.4.30.0170.07331.33
7.4.20.0240.06231.16
7.4.10.0260.06531.27
7.4.00.0330.05931.43
7.3.160.0300.05331.18
7.3.150.0130.07931.21
7.3.140.0130.07931.37
7.3.130.0380.05231.19
7.3.120.0300.08931.24
7.3.110.0170.07330.96
7.3.100.0250.07031.07
7.3.90.0220.07031.15
7.3.80.0240.06531.10
7.3.70.0200.06531.16
7.3.60.0290.05931.02
7.3.50.0290.06530.98
7.3.40.0430.06931.10
7.3.30.0300.05631.03
7.3.20.0370.07331.15
7.3.10.0400.07031.08
7.3.00.0930.07931.08
7.2.290.0130.07731.11
7.2.280.0200.07531.20
7.2.270.0260.07531.22
7.2.260.0260.07731.41
7.2.250.0260.08831.31
7.2.240.0520.09630.98
7.2.230.0260.08131.23
7.2.220.0230.08931.13
7.2.210.0340.06131.43
7.2.200.0200.10831.21
7.2.190.0300.06331.07
7.2.180.0290.06631.31
7.2.170.0260.07531.22
7.2.160.0230.08431.03
7.2.150.0410.08031.25
7.2.140.0360.09831.11
7.2.130.0300.08931.43
7.2.120.0360.06631.21
7.2.110.0390.06231.14
7.2.100.0320.06831.11
7.2.90.0160.09231.34
7.2.80.0350.06131.32
7.2.70.0230.10131.34
7.2.60.0260.07231.11
7.2.50.0330.08230.89
7.2.40.0470.07431.36
7.2.30.0220.07531.14
7.2.20.0280.07331.06
7.2.10.0230.10631.16
7.2.00.1510.08032.17
7.1.330.0340.08630.20
7.1.320.0480.06830.23
7.1.310.0380.07630.51
7.1.300.0410.08230.23
7.1.290.0400.08330.38
7.1.280.0170.09330.13
7.1.270.0290.11530.21
7.1.260.0430.06530.07
7.1.250.0240.10530.00
7.1.240.0280.07730.00
7.1.230.0510.06430.18
7.1.220.0390.10429.87
7.1.210.0190.11830.02
7.1.200.0470.10430.38
7.1.190.0510.06430.27
7.1.180.0190.09429.86
7.1.170.0320.09129.81
7.1.160.0480.10030.05
7.1.150.0260.08330.24
7.1.140.0470.09430.13
7.1.130.0300.07730.12
7.1.120.0980.09930.85
7.1.110.0770.08531.15
7.1.100.0740.10230.83
7.1.90.0600.08330.89
7.1.80.0620.09230.81
7.1.70.0870.09730.30
7.1.60.1060.08239.26
7.1.50.0840.08738.98
7.1.40.1140.10038.86
7.1.30.1160.08738.91
7.1.20.1160.08239.25
7.1.10.0700.07730.04
7.1.00.1300.10131.70
7.0.330.0380.07029.95
7.0.320.0370.10229.81
7.0.310.0380.07729.84
7.0.300.0390.08829.96
7.0.290.0540.07130.11
7.0.280.0230.08629.86
7.0.270.0230.08429.97
7.0.260.1320.09830.60
7.0.250.0670.07830.59
7.0.240.0540.09930.70
7.0.230.0640.09930.61
7.0.220.0550.07830.50
7.0.210.2530.07729.84
7.0.200.1020.10029.97
7.0.190.0840.08030.12
7.0.180.1150.10329.64
7.0.170.0950.10129.77
7.0.160.1230.10029.54
7.0.150.0700.09029.67
7.0.140.1710.10731.38
7.0.130.1440.09731.43
7.0.120.1870.10431.53
7.0.110.2050.10731.53
7.0.100.1450.11331.35
7.0.90.1680.09331.42
7.0.80.1650.09231.55
7.0.70.1850.10231.51
7.0.60.1560.08931.43
7.0.50.1840.09631.57
7.0.40.1670.10531.62
7.0.30.1800.08931.45
7.0.20.1800.11331.59
7.0.10.1970.10631.49
7.0.00.1640.09931.54
5.6.400.0420.51045.86
5.6.390.0360.50045.31
5.6.380.0270.48045.59
5.6.370.0390.51045.75
5.6.360.0290.41845.90
5.6.350.0330.45045.76
5.6.340.0410.45545.43
5.6.330.0360.40345.90
5.6.320.0370.41045.83
5.6.310.0530.54745.80
5.6.300.0300.51448.17
5.6.290.0450.41148.81
5.6.280.0320.46848.86
5.6.270.0310.47848.86
5.6.260.0310.50548.99
5.6.250.0540.58748.83
5.6.240.0440.43248.92
5.6.230.0420.40748.86
5.6.220.0380.44148.90
5.6.210.0360.45349.06
5.6.200.0590.46148.94
5.6.190.0480.51448.90
5.6.180.0310.49749.00
5.6.170.0500.53448.89
5.6.160.0540.49448.96
5.6.150.0480.49048.87
5.6.140.0400.48848.93
5.6.130.0350.51448.89
5.6.120.0300.44548.99
5.6.110.0380.46748.81
5.6.100.0410.53348.94
5.6.90.0420.46448.92
5.6.80.0330.40848.58
5.6.70.0400.45448.46
5.6.60.0370.44548.44
5.6.50.0390.42048.48
5.6.40.0280.42548.34
5.6.30.0330.44448.38
5.6.20.0400.55948.51
5.6.10.0360.53148.43
5.6.00.0340.50048.48
5.5.380.0520.45846.65
5.5.370.0280.40746.54
5.5.360.0350.48546.75
5.5.350.0420.45846.59
5.5.340.0430.46546.93
5.5.330.0460.50047.02
5.5.320.0310.47347.03
5.5.310.0470.52446.97
5.5.300.0340.48247.02
5.5.290.0370.44546.97
5.5.280.0380.50246.89
5.5.270.0430.46246.93
5.5.260.0380.51846.89
5.5.250.0380.53946.80
5.5.240.0390.47546.54
5.5.230.0370.39946.43
5.5.220.0450.42746.52
5.5.210.0290.50446.53
5.5.200.0400.41046.53
5.5.190.0420.48046.50
5.5.180.0360.63246.36
5.5.170.0770.59845.74
5.5.160.0390.48446.50
5.5.150.0340.46346.58
5.5.140.0370.49446.49
5.5.130.0450.52246.51
5.5.120.0330.50846.46
5.5.110.0330.38546.40
5.5.100.0410.44846.43
5.5.90.0290.44546.33
5.5.80.0300.41346.46
5.5.70.0360.43046.55
5.5.60.0370.40846.39
5.5.50.0400.47146.45
5.5.40.0480.44746.44
5.5.30.0330.53046.40
5.5.20.0350.48246.49
5.5.10.0400.47446.32
5.5.00.0380.50646.32
5.4.450.0400.39146.86
5.4.440.0320.45346.63
5.4.430.0370.43146.74
5.4.420.0320.45646.75
5.4.410.0420.41946.70
5.4.400.0320.45746.53
5.4.390.0350.48246.55
5.4.380.0390.41446.52
5.4.370.0410.48346.52
5.4.360.0320.42246.47
5.4.350.0460.52546.51
5.4.340.0350.56046.50
5.4.330.0350.61242.47
5.4.320.0390.43146.47
5.4.310.0330.44446.41
5.4.300.0350.51746.43
5.4.290.0330.48446.49
5.4.280.0520.50946.53
5.4.270.0360.45746.42
5.4.260.0290.41746.43
5.4.250.0310.43946.40
5.4.240.0430.49946.48
5.4.230.0430.43946.42
5.4.220.0370.46446.46
5.4.210.0330.47146.47
5.4.200.0320.44746.55
5.4.190.0260.43546.50
5.4.180.0540.51446.45
5.4.170.0300.50746.42
5.4.160.0390.42846.45
5.4.150.0290.39146.50
5.4.140.0310.44144.79
5.4.130.0390.45344.79
5.4.120.0340.44644.82
5.4.110.0370.49244.81
5.4.100.0400.49544.89
5.4.90.0360.45544.82
5.4.80.0280.40544.76
5.4.70.0370.47844.84
5.4.60.0270.53344.71
5.4.50.0390.48344.65
5.4.40.0450.49744.79
5.4.30.0460.49844.76
5.4.20.0330.45844.76
5.4.10.0250.43044.76
5.4.00.0310.51244.38
5.3.290.0340.39043.22
5.3.280.0370.42843.12
5.3.270.0390.46143.12
5.3.260.0280.45543.17
5.3.250.0310.40343.22
5.3.240.0400.51043.08
5.3.230.0410.43743.22
5.3.220.0400.44243.08
5.3.210.0320.46443.10
5.3.200.0360.44543.09
5.3.190.0280.46743.03
5.3.180.0420.41243.19
5.3.170.0340.45743.07
5.3.160.0300.45543.15
5.3.150.0460.51043.19
5.3.140.0480.52943.05
5.3.130.0290.39543.08
5.3.120.0240.39743.06
5.3.110.0350.38943.13
5.3.100.0350.44242.80
5.3.90.0350.39042.83
5.3.80.0290.41742.70
5.3.70.0330.50242.64
5.3.60.0390.45042.56
5.3.50.0300.45742.66
5.3.40.0310.43142.63
5.3.30.0462.25442.84
5.3.20.0382.37542.57
5.3.10.0422.36542.49
5.3.00.0482.32742.50
5.2.170.0350.45739.92
5.2.160.0440.50839.96
5.2.150.0300.48339.91
5.2.140.0562.34239.88
5.2.130.0312.41439.84
5.2.120.0412.26339.93
5.2.110.0372.33139.87

preferences:
12.98 ms | 406 KiB | 5 Q