3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr =[['c' => 3], ['a' => 1, 'b' => 2, 'c' => 3], ['c' => 3]]; $new = $arr[0]; foreach($arr as $sub){ $new = array_intersect_key($new, $sub); } foreach($arr as &$sub){ $sub =array_intersect_key($sub, $new); } Var_dump($arr);

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.5.10.0090.01016.58
8.5.00.0100.01019.86
8.4.150.0010.00014.05
8.4.140.0110.00917.48
8.4.130.0060.00318.87
8.4.120.0100.01023.93
8.4.110.0120.00820.55
8.4.100.0120.00917.76
8.4.90.0100.01018.61
8.4.80.0070.00218.00
8.4.70.0090.00617.77
8.4.60.0110.00918.63
8.4.50.0110.00618.61
8.4.40.0060.01317.52
8.4.30.0040.00419.15
8.4.20.0060.00918.50
8.4.10.0090.00617.65
8.3.280.0110.01018.31
8.3.270.0130.00616.68
8.3.260.0110.00816.32
8.3.250.0100.00918.74
8.3.240.0110.00717.28
8.3.230.0090.01016.64
8.3.220.0050.00317.24
8.3.210.0140.00918.34
8.3.200.0050.00416.44
8.3.190.0120.00817.13
8.3.180.0120.00716.48
8.3.170.0120.00617.05
8.3.160.0060.01217.36
8.3.150.0040.00420.61
8.3.140.0080.00016.48
8.3.130.0090.00616.54
8.3.120.0030.00618.79
8.3.110.0040.00420.94
8.3.100.0090.00616.65
8.3.90.0040.01126.77
8.3.80.0060.00319.36
8.3.70.0040.01118.15
8.3.60.0120.00616.50
8.3.50.0100.00518.09
8.3.40.0080.00818.67
8.3.30.0120.00318.33
8.3.20.0040.00419.25
8.3.10.0040.00423.73
8.3.00.0040.00420.82
8.2.290.0120.00418.94
8.2.280.0100.00822.27
8.2.270.0060.00317.34
8.2.260.0180.00016.70
8.2.250.0080.00018.28
8.2.240.0080.00016.96
8.2.230.0070.00422.58
8.2.220.0030.00624.06
8.2.210.0100.00726.77
8.2.200.0000.00818.88
8.2.190.0120.00318.44
8.2.180.0120.00416.50
8.2.170.0040.01118.94
8.2.160.0030.01222.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00420.87
8.2.120.0080.00026.35
8.2.110.0030.00720.12
8.2.100.0040.00717.91
8.2.90.0000.00720.54
8.2.80.0080.00017.97
8.2.70.0040.00417.93
8.2.60.0000.01218.22
8.2.50.0040.00418.10
8.2.40.0060.00319.33
8.2.30.0070.00020.52
8.2.20.0070.00318.14
8.2.10.0040.00418.20
8.2.00.0050.00219.43
8.1.330.0120.00816.32
8.1.320.0140.00616.13
8.1.310.0150.00318.04
8.1.300.0130.00617.99
8.1.290.0060.00330.84
8.1.280.0090.00925.92
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.01223.90
8.1.230.0110.00020.76
8.1.220.0040.00417.74
8.1.210.0040.00918.96
8.1.200.0030.00617.36
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0040.00418.84
8.1.160.0000.00718.91
8.1.150.0000.00718.91
8.1.140.0080.00019.12
8.1.130.0090.00019.02
8.1.120.0040.00417.36
8.1.110.0040.00417.35
8.1.100.0040.00417.52
8.1.90.0030.00517.36
8.1.80.0030.00817.46
8.1.70.0040.00417.46
8.1.60.0030.00517.55
8.1.50.0000.00817.49
8.1.40.0020.00517.46
8.1.30.0000.00817.51
8.1.20.0000.00917.54
8.1.10.0030.00517.53
8.1.00.0080.00017.44
8.0.300.0060.00320.01
8.0.290.0050.00316.75
8.0.280.0040.00418.39
8.0.270.0040.00416.74
8.0.260.0030.00320.25
8.0.250.0040.00416.93
8.0.240.0030.00316.97
8.0.230.0000.00716.86
8.0.220.0000.00716.95
8.0.210.0080.00016.89
8.0.200.0040.00416.83
8.0.190.0040.00716.68
8.0.180.0080.00016.97
8.0.170.0030.00616.85
8.0.160.0030.00416.89
8.0.150.0000.00716.84
8.0.140.0070.00016.84
8.0.130.0000.00513.34
8.0.120.0000.01116.89
8.0.110.0000.00716.82
8.0.100.0080.00016.94
8.0.90.0030.00516.78
8.0.80.0100.00616.93
8.0.70.0000.00717.00
8.0.60.0050.00316.96
8.0.50.0000.00716.95
8.0.30.0060.01116.85
8.0.20.0100.01317.40
8.0.10.0050.00317.02
8.0.00.0120.01016.77
7.4.330.0000.00415.55
7.4.320.0030.00316.45
7.4.300.0030.00316.43
7.4.290.0000.00716.63
7.4.280.0040.00416.40
7.4.270.0030.00316.56
7.4.260.0000.00716.54
7.4.250.0030.00316.52
7.4.240.0030.00316.42
7.4.230.0040.00416.31
7.4.220.0040.00416.35
7.4.210.0060.00816.72
7.4.200.0040.00416.50
7.4.160.0120.00716.55
7.4.140.0100.01217.86
7.4.130.0110.01116.41
7.4.120.0130.00816.50
7.4.110.0080.00916.54
7.4.100.0180.00016.56
7.4.90.0120.00616.39
7.4.80.0120.00919.39
7.4.70.0040.01216.61
7.4.60.0080.00816.47
7.4.50.0040.01116.34
7.4.40.0080.01216.46
7.4.00.0090.00614.94
7.3.330.0000.00513.09
7.3.320.0000.00613.01
7.3.310.0040.00416.42
7.3.300.0000.00716.34
7.3.290.0040.00416.22
7.3.280.0140.00716.25
7.3.260.0100.00716.44
7.3.240.0120.00616.43
7.3.230.0090.00916.29
7.3.210.0090.00916.34
7.3.200.0120.00816.28
7.3.190.0070.01416.26
7.3.180.0160.00616.61
7.3.170.0080.00816.46
7.3.160.0130.00716.23
7.3.120.0040.01414.65
7.3.110.0060.01314.72
7.3.100.0030.00914.87
7.3.90.0000.01114.94
7.3.80.0030.00914.82
7.3.70.0070.01014.96
7.3.60.0070.00314.77
7.3.50.0060.01014.71
7.3.40.0050.00314.68
7.3.30.0090.00614.78
7.3.20.0070.00716.59
7.3.10.0080.00516.46
7.3.00.0080.00416.52
7.2.330.0100.00716.71
7.2.320.0080.00916.45
7.2.310.0060.01616.57
7.2.300.0060.01016.71
7.2.290.0060.01116.89
7.2.240.0030.00914.96
7.2.230.0030.01015.08
7.2.220.0070.00715.02
7.2.210.0070.00714.95
7.2.200.0030.00915.16
7.2.190.0030.00914.88
7.2.180.0080.00314.96
7.2.170.0000.00815.09
7.2.160.0130.00314.89
7.2.150.0090.00616.62
7.2.140.0000.01117.07
7.2.130.0080.01016.74
7.2.120.0080.00616.74
7.2.110.0080.00716.70
7.2.100.0050.01116.77
7.2.90.0080.00616.31
7.2.80.0050.01116.37
7.2.70.0090.01016.27
7.2.60.0280.00616.24
7.2.50.0370.00716.24
7.2.40.0100.00716.42
7.2.30.0440.01016.42
7.2.20.0360.00816.20
7.2.10.0390.00616.29
7.2.00.0400.00716.45
7.1.330.0120.00315.87
7.1.320.0070.00715.90
7.1.310.0040.01115.91
7.1.300.0070.00415.55
7.1.290.0060.01015.80
7.1.280.0060.00315.85
7.1.270.0070.00315.54
7.1.260.0000.00815.86
7.1.250.0090.00315.62
7.1.210.2070.00313.84
7.1.200.0070.00713.60
7.1.190.1790.00613.96
7.1.180.0550.00713.94
7.1.170.1260.00613.88
7.1.160.0150.00814.11
7.1.150.1320.00713.54
7.1.140.1410.01014.08
7.1.130.1230.00313.82
7.1.120.1310.00714.03
7.1.110.1730.00313.87
7.1.100.0410.00414.01
7.1.90.0090.00513.75
7.1.80.0080.00813.84
7.1.70.0910.00913.96
7.1.60.0220.01131.99
7.1.50.0300.01331.91
7.1.40.0270.00731.98
7.1.30.1950.01632.01
7.1.20.0240.01031.67
7.1.10.0330.01113.67
7.1.00.0130.00413.92

preferences:
166.56 ms | 403 KiB | 5 Q