3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Source: https://bugs.php.net/bug.php?id=47643 $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";

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.10.0370.04730.47
7.3.00.0260.05130.64
7.2.130.0360.05030.51
7.2.120.0380.05530.53
7.2.110.0260.06530.87
7.2.100.0430.05730.43
7.2.90.0470.05030.74
7.2.80.0400.04930.88
7.2.70.0600.04430.78
7.2.60.0450.05230.88
7.2.50.0440.06930.71
7.2.40.0420.06230.83
7.2.30.0460.06430.84
7.2.20.0540.05030.96
7.2.10.0350.06130.95
7.2.00.0250.06430.68
7.1.250.0310.07229.48
7.1.70.0030.04431.07
7.1.60.0100.07631.07
7.1.50.0160.05630.78
7.1.00.0030.07336.45
7.0.200.1020.05229.80
7.0.140.0070.13336.07
7.0.60.0200.13035.52
7.0.50.0230.12735.81
7.0.40.0100.10728.04
7.0.30.0030.10728.08
7.0.20.0100.13028.11
7.0.10.0070.14728.07
7.0.00.0070.13028.03
5.6.280.0230.29350.71
5.6.210.0230.30750.44
5.6.200.0130.29750.74
5.6.190.0230.27050.74
5.6.180.0070.29350.87
5.6.170.0170.25050.74
5.6.160.0170.29350.74
5.6.150.0270.28750.77
5.6.140.0100.27750.75
5.6.130.0200.28350.76
5.6.120.0230.29750.72
5.6.110.0130.32750.70
5.6.100.0130.24750.69
5.6.90.0170.27350.68
5.6.80.0230.29050.21
5.6.70.0200.29750.21
5.6.60.0130.26350.28
5.6.50.0100.29750.24
5.6.40.0070.23750.09
5.6.30.0170.26750.07
5.6.20.0130.28350.01
5.6.10.0100.29350.06
5.6.00.0230.29350.16
5.5.350.0000.31050.10
5.5.340.0130.25050.59
5.5.330.0170.31050.49
5.5.320.0270.28050.60
5.5.310.0200.24350.59
5.5.300.0130.29050.49
5.5.290.0100.30350.43
5.5.280.0530.27350.58
5.5.270.0170.29350.50
5.5.260.0170.29750.48
5.5.250.0070.30050.40
5.5.240.0170.28350.07
5.5.230.0270.28349.86
5.5.220.0200.31049.96
5.5.210.0200.27749.83
5.5.200.0200.28349.75
5.5.190.0170.29749.84
5.5.180.0130.30350.03
5.5.160.0100.26349.91
5.5.150.0100.29049.83
5.5.140.0070.30049.86
5.5.130.0170.29349.86
5.5.120.0070.30049.83
5.5.110.0030.28050.02
5.5.100.0070.30749.91
5.5.90.0300.28349.80
5.5.80.0170.25349.70
5.5.70.0070.28349.82
5.5.60.0100.25049.72
5.5.50.0170.29349.77
5.5.40.0200.29049.80
5.5.30.0200.28349.80
5.5.20.0100.29349.71
5.5.10.0270.28749.79
5.5.00.0100.28049.88
5.4.450.0200.26348.98
5.4.440.0130.30349.02
5.4.430.0170.30049.18
5.4.420.0070.24748.95
5.4.410.0070.25348.80
5.4.400.0330.26748.54
5.4.390.0170.29348.50
5.4.380.0100.30748.75
5.4.370.0200.27048.60
5.4.360.0130.30048.58
5.4.350.0130.29348.58
5.4.340.0130.29748.65
5.4.320.0200.23748.50
5.4.310.0170.27348.64
5.4.300.0200.28348.62
5.4.290.0170.27748.64
5.4.280.0270.28348.61
5.4.270.0230.28348.54
5.4.260.0100.31048.55
5.4.250.0130.29348.68
5.4.240.0270.22048.63
5.4.230.0170.28748.58
5.4.220.0100.29748.57
5.4.210.0200.29048.66
5.4.200.0030.29048.60
5.4.190.0200.30348.67
5.4.180.0100.30048.59
5.4.170.0300.27748.79
5.4.160.0170.24748.65
5.4.150.0200.25748.75
5.4.140.0100.27745.99
5.4.130.0170.29346.09
5.4.120.0200.28046.04
5.4.110.0270.28045.93
5.4.100.0100.30045.93
5.4.90.0370.27346.13
5.4.80.0530.27045.96
5.4.70.0030.30346.04
5.4.60.0170.28346.06
5.4.50.0030.23346.00
5.4.40.0100.21745.93
5.4.30.0100.20345.94
5.4.20.0030.26045.89
5.4.10.0070.22745.92
5.4.00.0030.23345.24
5.3.290.0030.22343.72
5.3.280.0130.26743.68
5.3.270.0000.28743.70
5.3.260.0270.28043.65
5.3.250.0130.24343.66
5.3.240.0070.28043.65
5.3.230.0170.26343.70
5.3.220.0100.27743.66
5.3.210.0030.29343.51
5.3.200.0100.26043.61
5.3.190.0100.29043.66
5.3.180.0170.28043.60
5.3.170.0100.26343.57
5.3.160.0130.25043.59
5.3.150.0130.23743.53
5.3.140.0070.26743.59
5.3.130.0100.26043.49
5.3.120.0170.24743.58
5.3.110.0070.25743.60
5.3.100.0070.19743.08
5.3.90.0070.20743.02
5.3.80.0030.19743.05
5.3.70.0000.20043.05
5.3.60.0100.19043.01
5.3.50.0030.20342.77
5.3.40.0070.18042.95
5.3.30.0372.37043.10
5.3.20.0602.36342.84
5.3.10.0332.42042.83
5.3.00.0372.39042.83

preferences:
36.11 ms | 401 KiB | 5 Q