3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "green", "b" => "yellow", "blue", "red"); $result_array = array_intersect_assoc($array1, $array2); print_r($result_array);

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.0070.00716.73
8.3.50.0130.00816.34
8.3.40.0100.00718.59
8.3.30.0110.00418.46
8.3.20.0000.00818.35
8.3.10.0030.00620.54
8.3.00.0080.00017.38
8.2.180.0090.00616.32
8.2.170.0110.00322.96
8.2.160.0030.01022.03
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0060.00319.82
8.2.110.0090.00021.19
8.2.100.0080.00317.78
8.2.90.0050.00319.09
8.2.80.0080.00017.97
8.2.70.0030.00617.50
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0080.00018.09
8.2.30.0080.00517.77
8.2.20.0050.00518.35
8.2.10.0090.00417.64
8.2.00.0120.00017.57
8.1.280.0040.01125.92
8.1.270.0030.00523.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.53
8.1.230.0000.01120.85
8.1.220.0000.00818.77
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0030.00717.41
8.1.180.0060.00318.10
8.1.170.0040.00418.84
8.1.160.0090.00318.18
8.1.150.0080.00417.99
8.1.140.0110.00217.39
8.1.130.0070.00617.67
8.1.120.0080.00417.43
8.1.110.0050.00717.46
8.1.100.0060.00617.38
8.1.90.0080.00317.46
8.1.80.0090.00317.45
8.1.70.0060.00617.40
8.1.60.0050.00817.45
8.1.50.0100.00317.44
8.1.40.0110.00117.46
8.1.30.0080.00517.54
8.1.20.0060.00717.52
8.1.10.0070.00517.48
8.1.00.0060.00717.41
8.0.300.0100.00019.76
8.0.290.0000.00716.63
8.0.280.0080.00417.93
8.0.270.0030.00817.34
8.0.260.0080.00317.12
8.0.250.0100.00217.19
8.0.240.0060.00717.14
8.0.230.0050.00717.19
8.0.220.0080.00317.16
8.0.210.0040.00817.11
8.0.200.0100.00217.19
8.0.190.0090.00317.18
8.0.180.0060.00617.16
8.0.170.0040.00817.18
8.0.160.0090.00217.16
8.0.150.0090.00417.13
8.0.140.0080.00517.09
8.0.130.0060.00515.34
8.0.120.0090.00317.08
8.0.110.0070.00617.06
8.0.100.0110.00217.09
8.0.90.0040.00817.07
8.0.80.0090.00617.13
8.0.70.0080.00617.19
8.0.60.0020.00917.16
8.0.50.0090.00217.10
8.0.30.0140.00717.26
8.0.20.0100.01017.08
8.0.10.0070.00417.17
8.0.00.0150.00416.95
7.4.330.0070.00215.23
7.4.320.0080.00316.99
7.4.300.0120.00016.92
7.4.290.0080.00316.96
7.4.280.0070.00516.96
7.4.270.0070.00517.01
7.4.260.0060.00415.34
7.4.250.0060.00717.00
7.4.240.0070.00516.93
7.4.230.0080.00316.84
7.4.220.0110.00516.98
7.4.210.0080.00816.74
7.4.200.0060.00516.96
7.4.190.0060.00516.99
7.4.180.0150.00017.50
7.4.160.0080.00816.93
7.4.150.0080.00816.94
7.4.140.0050.01216.77
7.4.130.0050.01116.76
7.4.120.0110.00616.74
7.4.110.0120.00716.96
7.4.100.0080.00816.96
7.4.90.0110.00516.76
7.4.80.0070.00916.79
7.4.70.0110.00816.64
7.4.60.0100.00616.71
7.4.50.0120.00316.70
7.4.40.0090.00616.75
7.4.30.0130.00316.66
7.4.20.0120.00416.80
7.4.10.0080.01216.90
7.4.00.0080.00716.18
7.3.330.0040.00615.31
7.3.320.0050.00515.18
7.3.310.0070.00416.85
7.3.300.0030.00916.76
7.3.290.0100.00616.84
7.3.280.0120.00316.48
7.3.270.0070.00916.87
7.3.260.0120.00916.72
7.3.250.0150.00116.63
7.3.240.0080.00816.97
7.3.230.0130.00416.93
7.3.220.0100.00517.50
7.3.210.0080.00816.59
7.3.200.0100.00917.68
7.3.190.0100.00816.63
7.3.180.0110.00616.67
7.3.170.0090.00716.60
7.3.160.0100.00616.69
7.3.150.0130.00516.73
7.3.140.0010.01416.89
7.3.130.0120.00516.74
7.3.120.0060.00916.20
7.3.110.0090.00616.88
7.3.100.0090.00716.86
7.3.90.0070.00916.75
7.3.80.0080.00816.88
7.3.70.0130.00416.85
7.3.60.0100.00716.76
7.3.50.0100.00516.77
7.3.40.0120.00316.81
7.3.30.0080.00816.79
7.3.20.0120.00316.87
7.3.10.0110.00517.06
7.3.00.0090.00716.91
7.2.340.0120.00417.50
7.2.330.0090.00816.69
7.2.320.0070.01016.75
7.2.310.0110.00816.91
7.2.300.0070.01016.67
7.2.290.0120.00716.68
7.2.280.0100.00716.92
7.2.270.0120.00616.99
7.2.260.0130.00516.98
7.2.250.0100.00716.96
7.2.240.0110.00616.81
7.2.230.0100.01016.93
7.2.220.0120.00516.83
7.2.210.0130.00516.89
7.2.200.0130.00516.86
7.2.190.0130.00816.90
7.2.180.0140.00617.00
7.2.170.0130.00716.93
7.2.160.0110.00716.98
7.2.150.0140.00417.14
7.2.140.0100.00717.09
7.2.130.0080.00817.07
7.2.120.0090.00817.08
7.2.110.0150.00717.31
7.2.100.0090.00817.09
7.2.90.0090.01017.09
7.2.80.0110.00617.18
7.2.70.0130.00417.26
7.2.60.0060.01016.94
7.2.50.0070.01017.10
7.2.40.0130.00517.11
7.2.30.0190.01017.13
7.2.20.0130.00717.28
7.2.10.0090.00817.34
7.2.00.0100.00617.83
7.1.330.0140.01016.55
7.1.320.0180.00616.50
7.1.310.0230.00616.39
7.1.300.0130.01016.48
7.1.290.0170.00616.51
7.1.280.0170.00716.44
7.1.270.0170.00516.51
7.1.260.0140.00816.41
7.1.250.0180.00616.50
7.1.240.0280.00616.45
7.1.230.0180.00616.42
7.1.220.0160.00716.53
7.1.210.0170.00516.36
7.1.200.0100.00816.20
7.1.190.0210.00316.45
7.1.180.0130.01016.38
7.1.170.0170.00516.50
7.1.160.0140.00916.45
7.1.150.0150.00816.51
7.1.140.0160.00716.47
7.1.130.0130.00916.43
7.1.120.0190.00416.47
7.1.110.0140.01016.49
7.1.100.0110.01016.93
7.1.90.0150.00716.42
7.1.80.0150.00716.48
7.1.70.0130.00416.60
7.1.60.0130.00917.42
7.1.50.0170.00822.48
7.1.40.0070.01216.53
7.1.30.0130.00416.35
7.1.20.0140.00416.55
7.1.10.0120.00616.43
7.1.00.0060.03118.42
7.0.330.0130.00716.33
7.0.320.0280.00816.23
7.0.310.0150.00616.19
7.0.300.0150.00416.28
7.0.290.0130.00816.25
7.0.280.0100.00816.29
7.0.270.0160.00316.10
7.0.260.0130.00416.25
7.0.250.0110.01216.20
7.0.240.0120.00516.30
7.0.230.0130.00516.30
7.0.220.0120.00616.32
7.0.210.0060.01016.25
7.0.200.0170.00715.64
7.0.190.0130.00416.13
7.0.180.0100.00616.32
7.0.170.0110.00516.23
7.0.160.0130.00416.29
7.0.150.0160.00516.18
7.0.140.0100.02618.20
7.0.130.0110.00516.11
7.0.120.0070.02818.13
7.0.110.0090.00816.18
7.0.100.0120.00416.09
7.0.90.0150.00116.25
7.0.80.0080.00816.21
7.0.70.0130.00516.28
7.0.60.0090.03117.45
7.0.50.0070.02116.79
7.0.40.0130.02016.66
7.0.30.0150.02116.78
7.0.20.0130.02916.79
7.0.10.0130.02016.76
7.0.00.0150.01916.75
5.6.400.0190.00316.71
5.6.390.0100.01116.75
5.6.380.0130.00916.76
5.6.370.0130.00716.65
5.6.360.0130.00716.44
5.6.350.0140.00816.62
5.6.340.0130.00716.45
5.6.330.0120.00816.57
5.6.320.0070.01016.65
5.6.310.0110.00816.65
5.6.300.0130.00516.53
5.6.290.0070.01116.63
5.6.280.0070.03017.97
5.6.270.0110.00716.49
5.6.260.0110.00716.66
5.6.250.0080.00916.51
5.6.240.0120.00816.55
5.6.230.0150.00316.47
5.6.220.0110.00616.46
5.6.210.0130.03117.96
5.6.200.0120.02917.11
5.6.190.0100.02317.10
5.6.180.0130.01717.12
5.6.170.0120.02717.20
5.6.160.0140.01917.15
5.6.150.0130.02617.14
5.6.140.0130.02117.19
5.6.130.0130.02317.16
5.6.120.0100.03517.14
5.6.110.0120.03217.14
5.6.100.0160.02817.10
5.6.90.0150.02517.17
5.6.80.0140.02316.94
5.6.70.0060.02616.85
5.6.60.0120.03016.90
5.6.50.0090.03216.90
5.6.40.0110.02016.94
5.6.30.0130.03016.90
5.6.20.0090.03216.94
5.6.10.0090.03016.96
5.6.00.0160.02716.96
5.5.380.0110.00916.68
5.5.370.0130.00716.63
5.5.360.0110.01116.55
5.5.350.0140.02417.84
5.5.340.0110.01917.07
5.5.330.0110.02717.00
5.5.320.0120.02817.04
5.5.310.0080.03217.13
5.5.300.0130.02617.08
5.5.290.0090.02317.09
5.5.280.0130.03017.14
5.5.270.0140.03117.06
5.5.260.0160.01817.12
5.5.250.0140.02916.92
5.5.240.0150.02816.85
5.5.230.0110.01816.81
5.5.220.0120.02616.90
5.5.210.0130.02916.81
5.5.200.0110.02616.72
5.5.190.0160.02116.83
5.5.180.0110.02916.86
5.5.170.0200.00216.67
5.5.160.0130.02716.80
5.5.150.0150.02616.82
5.5.140.0140.02716.80
5.5.130.0100.01916.82
5.5.120.0140.02616.86
5.5.110.0090.03216.90
5.5.100.0170.02516.82
5.5.90.0120.02016.78
5.5.80.0090.03216.75
5.5.70.0120.03016.79
5.5.60.0150.02716.80
5.5.50.0130.02816.67
5.5.40.0120.02916.75
5.5.30.0150.02416.73
5.5.20.0150.02616.81
5.5.10.0150.02116.77
5.5.00.0130.01816.67
5.4.450.0070.02116.47
5.4.440.0090.03216.47
5.4.430.0100.02216.47
5.4.420.0110.02916.44
5.4.410.0100.01616.39
5.4.400.0090.03116.28
5.4.390.0120.02016.40
5.4.380.0070.03216.28
5.4.370.0110.01916.31
5.4.360.0120.02616.32
5.4.350.0050.03216.31
5.4.340.0100.02816.29
5.4.330.0120.00314.97
5.4.320.0140.02416.40
5.4.310.0100.01916.27
5.4.300.0090.02416.37
5.4.290.0090.01716.31
5.4.280.0090.02016.33
5.4.270.0100.01816.32
5.4.260.0110.02816.25
5.4.250.0120.02016.25
5.4.240.0130.02516.39
5.4.230.0090.03016.28
5.4.220.0100.02916.27
5.4.210.0110.02716.29
5.4.200.0130.02716.24
5.4.190.0120.02716.27
5.4.180.0110.01416.37
5.4.170.0100.02116.28
5.4.160.0080.03216.31
5.4.150.0130.02316.26
5.4.140.0090.02115.43
5.4.130.0070.02115.41
5.4.120.0150.01215.39
5.4.110.0110.02215.47
5.4.100.0080.02915.36
5.4.90.0040.02015.46
5.4.80.0140.02115.50
5.4.70.0090.02615.38
5.4.60.0110.02515.43
5.4.50.0110.02615.46
5.4.40.0130.02515.48
5.4.30.0090.02915.38
5.4.20.0100.02015.53
5.4.10.0070.03015.46
5.4.00.0080.02915.34
5.3.290.0080.03115.01
5.3.280.0150.02315.03
5.3.270.0070.02515.02
5.3.260.0100.02615.04
5.3.250.0080.02514.99
5.3.240.0090.02315.04
5.3.230.0060.02315.04
5.3.220.0150.02414.88
5.3.210.0130.02514.96
5.3.200.0090.02414.93
5.3.190.0080.02914.98
5.3.180.0080.02215.00
5.3.170.0120.02215.08
5.3.160.0110.02915.09
5.3.150.0110.02615.02
5.3.140.0100.02814.97
5.3.130.0100.02014.93
5.3.120.0080.02514.92
5.3.110.0090.03114.96
5.3.100.0090.03014.78
5.3.90.0140.02314.79
5.3.80.0120.02014.72
5.3.70.0100.02914.77
5.3.60.0090.02414.80
5.3.50.0080.02314.74
5.3.40.0100.02714.74
5.3.30.0100.02714.82
5.3.20.0130.02514.64
5.3.10.0100.02414.57
5.3.00.0070.01814.58

preferences:
67.07 ms | 400 KiB | 5 Q