3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_key_match($target, $match) { $targetKeys = array_keys($target); $diff = array_diff($target, $match); return ($diff == array_diff($diff, $match)); } function test($target, $match, $expect) { return preg_replace('/\n/', '', sprintf( "Target %s, Match %s: %s\n", print_r($target, true), print_r($match, true), (array_key_match($target, $match) == $expect) ? 'true' : 'false' )); } print test([1, 2, 3, 4, 5], [2, 3], true); print test(['a', 'b', 'c'], ['c', 'b'], true); print test([1, 2, 3, 4, 5], [4, 5, 6], false);

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.40.0110.00718.84
8.3.30.0030.01319.04
8.3.20.0070.00020.39
8.3.10.0040.00421.95
8.3.00.0000.00819.25
8.2.170.0070.00722.96
8.2.160.0140.00020.34
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00019.48
8.2.110.0070.00321.93
8.2.100.0080.00417.91
8.2.90.0040.00419.17
8.2.80.0060.00317.97
8.2.70.0040.00417.63
8.2.60.0030.00617.93
8.2.50.0030.00618.07
8.2.40.0060.00319.88
8.2.30.0070.00017.97
8.2.20.0090.00017.83
8.2.10.0040.00418.09
8.2.00.0040.00417.74
8.1.270.0030.00619.00
8.1.260.0000.00726.35
8.1.250.0050.00328.09
8.1.240.0050.00523.84
8.1.230.0120.00022.63
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0050.00317.48
8.1.180.0080.00018.10
8.1.170.0070.00019.04
8.1.160.0070.00022.03
8.1.150.0030.00518.96
8.1.140.0000.00817.58
8.1.130.0000.00717.59
8.1.120.0050.00317.56
8.1.110.0050.00317.54
8.1.100.0050.00217.58
8.1.90.0000.00717.57
8.1.80.0040.00417.53
8.1.70.0000.00717.52
8.1.60.0060.00317.61
8.1.50.0040.00417.72
8.1.40.0030.00717.66
8.1.30.0040.00417.69
8.1.20.0040.00417.78
8.1.10.0000.00817.61
8.1.00.0030.00617.48
8.0.300.0000.00720.00
8.0.290.0000.00716.75
8.0.280.0030.00318.46
8.0.270.0050.00317.28
8.0.260.0030.00317.03
8.0.250.0070.00017.14
8.0.240.0070.00017.10
8.0.230.0000.00717.13
8.0.220.0030.00516.92
8.0.210.0030.00317.00
8.0.200.0040.00416.99
8.0.190.0040.00417.14
8.0.180.0070.00017.04
8.0.170.0040.00416.95
8.0.160.0050.00317.13
8.0.150.0000.00816.89
8.0.140.0030.00616.97
8.0.130.0030.00313.46
8.0.120.0050.00217.03
8.0.110.0050.00216.97
8.0.100.0000.00717.00
8.0.90.0000.00716.91
8.0.80.0110.01117.08
8.0.70.0050.00216.93
8.0.60.0040.00416.93
8.0.50.0070.00016.98
8.0.30.0130.00817.23
8.0.20.0150.00617.40
8.0.10.0070.00017.03
8.0.00.0080.01016.98
7.4.330.0020.00215.03
7.4.320.0030.00316.73
7.4.300.0080.00016.56
7.4.290.0030.00316.86
7.4.280.0050.00316.85
7.4.270.0030.00316.82
7.4.260.0030.00616.84
7.4.250.0040.00416.83
7.4.240.0050.00316.80
7.4.230.0000.00716.73
7.4.220.0000.01816.87
7.4.210.0090.01316.68
7.4.200.0070.00016.92
7.4.160.0120.00316.84
7.4.150.0140.01217.40
7.4.140.0140.00517.86
7.4.130.0150.00416.71
7.4.120.0110.00716.75
7.4.110.0120.00616.54
7.4.100.0110.00816.65
7.4.90.0120.00616.69
7.4.80.0160.00019.39
7.4.70.0110.00416.70
7.4.60.0100.00716.77
7.4.50.0030.00516.78
7.4.40.0090.00916.68
7.4.30.0030.01716.78
7.4.00.0120.00614.83
7.3.330.0000.00513.47
7.3.320.0040.00913.46
7.3.310.0070.00016.47
7.3.300.0000.00716.47
7.3.290.0090.00616.48
7.3.280.0060.01116.47
7.3.270.0310.02017.40
7.3.260.0090.00916.94
7.3.250.0070.01216.64
7.3.240.0160.01016.54
7.3.230.0130.00316.59
7.3.210.0150.00316.57
7.3.200.0080.00819.39
7.3.190.0030.01716.80
7.3.180.0090.00916.57
7.3.170.0030.01316.73
7.3.160.0110.01216.79
7.3.10.0110.00716.67
7.3.00.0070.00516.80
7.2.330.0060.01216.58
7.2.320.0030.01416.79
7.2.310.0120.01216.66
7.2.300.0070.01016.77
7.2.290.0120.00616.76
7.2.130.0050.00916.88
7.2.120.0080.00516.79
7.2.110.0050.01016.86
7.2.100.0180.00416.97
7.2.90.0280.00717.04
7.2.80.0230.00916.93
7.2.70.0160.00616.80
7.2.60.0130.00716.93
7.2.50.0110.01317.13
7.2.40.0090.00616.94
7.2.30.0080.00817.19
7.2.20.0090.00817.02
7.2.10.0030.01016.80
7.2.00.0060.01217.93
7.1.250.0070.00815.65
7.1.240.0050.00515.86
7.1.230.0120.00615.52
7.1.220.0100.00315.74
7.1.210.0230.01415.98
7.1.200.0160.00915.81
7.1.190.0120.01515.67
7.1.180.0120.00815.85
7.1.170.0160.00815.63
7.1.160.0030.01016.03
7.1.150.0130.00715.83
7.1.140.0130.00415.57
7.1.130.0080.00515.75
7.1.120.0000.00915.71
7.1.110.0030.00915.67
7.1.100.0080.00317.15
7.1.90.0120.00315.89
7.1.80.0070.01015.79
7.1.70.0040.00916.68
7.1.60.0110.01017.61
7.1.50.0070.01116.30
7.1.40.0160.00315.88
7.1.30.0070.00515.86
7.1.20.0090.00615.93
7.1.10.0190.00015.76
7.1.00.0070.04019.07
7.0.330.0090.00615.37
7.0.320.0240.00415.50
7.0.310.0230.01115.40
7.0.300.0160.00915.47
7.0.290.0080.00815.40
7.0.280.0030.01215.47
7.0.270.0140.00315.15
7.0.260.0160.00315.48
7.0.250.0100.00615.45
7.0.240.0050.01015.28
7.0.230.0100.00715.65
7.0.220.0200.00315.27
7.0.210.0120.00415.45
7.0.200.0210.00915.35
7.0.190.0130.00315.42
7.0.180.0060.01215.51
7.0.170.0180.00015.63
7.0.160.0060.00915.70
7.0.150.0030.00615.48
7.0.140.0050.04018.75
7.0.130.0150.00415.52
7.0.120.0130.00815.39
7.0.110.0030.00915.21
7.0.100.0060.01315.44
7.0.90.0110.00415.60
7.0.80.0040.00615.74
7.0.70.0130.00715.17
7.0.60.0090.02017.64
7.0.50.0120.03816.79
7.0.40.0100.04316.88
7.0.30.0140.04016.90
7.0.20.0170.02816.81
7.0.10.0130.04316.91
7.0.00.0110.04116.94
5.6.380.0120.01214.63
5.6.370.0170.00614.20
5.6.360.0100.01014.46
5.6.350.0060.00914.54
5.6.340.0070.01414.43
5.6.330.0030.01314.54
5.6.320.0100.01314.05
5.6.310.0100.01714.35
5.6.300.0070.01114.49
5.6.290.0180.00314.46
5.6.280.0020.04317.58
5.6.270.0030.01014.55
5.6.260.0030.01014.52
5.6.250.0040.01214.03
5.6.240.0060.01314.16
5.6.230.0130.01014.16
5.6.220.0130.00414.34
5.6.210.0090.04117.36
5.6.200.0060.04516.36
5.6.190.0050.04817.28
5.6.180.0220.03717.27
5.6.170.0240.02217.32
5.6.160.0030.03217.31
5.6.150.0160.03816.13
5.6.140.0060.02616.27
5.6.130.0170.03716.17
5.6.120.0130.04317.64
5.6.110.0120.04717.55
5.6.100.0170.03017.41
5.6.90.0120.02017.70
5.6.80.0160.04017.32
5.6.70.0090.00614.13
5.6.60.0140.00914.21
5.6.50.0220.00714.42
5.6.40.0170.00314.02
5.6.30.0170.00713.99
5.6.20.0120.00914.22
5.6.10.0110.00713.91
5.6.00.0220.00014.27
5.5.380.0110.00811.17
5.5.370.0030.00711.15
5.5.360.0080.00410.91
5.5.350.0250.03215.91
5.5.340.0050.02514.47
5.5.330.0100.02315.80
5.5.320.0110.04415.79
5.5.310.0190.03815.70
5.5.300.0070.04114.44
5.5.290.0090.03314.51
5.5.280.0080.02315.86
5.5.270.0110.04515.98
5.5.260.0040.02315.78
5.5.250.0090.03715.85
5.5.240.0070.04615.68
5.5.230.0190.00011.16
5.5.220.0060.01010.99
5.5.210.0000.01011.22
5.5.200.0110.00411.09
5.5.190.0090.00610.99
5.5.180.0120.00310.93
5.5.170.0110.00711.07
5.5.160.0150.00310.85
5.5.150.0140.00710.93
5.5.140.0160.00311.23
5.5.130.0120.00910.76
5.5.120.0100.00711.11
5.5.110.0150.00610.93
5.5.100.0170.00810.89
5.5.90.0140.01010.94
5.5.80.0090.00610.66
5.5.70.0120.00810.98
5.5.60.0120.00310.91
5.5.50.0150.00010.99
5.5.40.0000.01511.01
5.5.30.0200.00510.95
5.5.20.0030.01211.14
5.5.10.0070.00511.12
5.5.00.0100.01310.83
5.4.450.0180.02515.19
5.4.440.0560.03315.34
5.4.430.0290.03615.08
5.4.420.0150.02815.19
5.4.410.0070.03215.10
5.4.400.0560.02714.81
5.4.390.0500.03814.56
5.4.380.0550.03714.68
5.4.370.0570.03014.70
5.4.360.0650.02814.94
5.4.350.0660.03014.70
5.4.340.0600.03014.98
5.4.330.0170.01010.77
5.4.320.0650.03114.71
5.4.310.0660.02314.73
5.4.300.0570.03014.87
5.4.290.0500.03014.82
5.4.280.0460.03114.62
5.4.270.0700.02714.77
5.4.260.0580.02814.87
5.4.250.0490.03514.63
5.4.240.0700.03714.62
5.4.230.0730.02914.68
5.4.220.0460.03314.53
5.4.210.0630.03614.73
5.4.200.0640.03613.83
5.4.190.0520.03214.61
5.4.180.0480.03714.81
5.4.170.0510.03214.78
5.4.160.0450.04614.75
5.4.150.0490.03314.71
5.4.140.0280.02713.64
5.4.130.0130.03313.63
5.4.120.0240.03513.49
5.4.110.0180.03813.53
5.4.100.0260.02813.36
5.4.90.0330.03313.57
5.4.80.0230.04013.37
5.4.70.0200.04013.43
5.4.60.0150.03713.57
5.4.50.0210.02913.76
5.4.40.0240.03513.66
5.4.30.0300.02813.76
5.4.20.0260.03113.81
5.4.10.0350.02913.71
5.4.00.0210.03313.24
5.3.290.0270.03812.60
5.3.280.0290.03012.54
5.3.270.0280.03612.49
5.3.260.0220.04012.45
5.3.250.0130.04312.43
5.3.240.0320.03312.42
5.3.230.0250.04012.47
5.3.220.0380.03312.46
5.3.210.0250.02712.32
5.3.200.0320.02712.44
5.3.190.0390.03812.50
5.3.180.0290.02412.47
5.3.170.0300.03712.48
5.3.160.0190.03712.56
5.3.150.0250.03312.55
5.3.140.0250.03312.45
5.3.130.0440.04012.39
5.3.120.0460.03212.41
5.3.110.0350.04012.47
5.3.100.0330.02712.22
5.3.90.0160.03512.29
5.3.80.0240.03012.29
5.3.70.0220.03312.18
5.3.60.0230.03012.15
5.3.50.0220.03312.05
5.3.40.0220.02812.19
5.3.30.0250.03512.18
5.3.20.0200.02712.01
5.3.10.0280.03011.85
5.3.00.0180.04011.90
5.2.170.0150.03810.15
5.2.160.0340.02810.15
5.2.150.0180.02610.27
5.2.140.0320.02810.17
5.2.130.0240.03010.25
5.2.120.0180.03010.26
5.2.110.0220.03010.29
5.2.100.0210.03510.21
5.2.90.0260.02910.22
5.2.80.0250.02410.25
5.2.70.0210.03110.25
5.2.60.0190.02510.09
5.2.50.0120.02710.13
5.2.40.0140.02710.05
5.2.30.0090.02710.12
5.2.20.0160.02310.06
5.2.10.0130.0299.97
5.2.00.0150.0209.76
5.1.60.0180.0259.20
5.1.50.0090.0249.05
5.1.40.0180.0209.25
5.1.30.0180.0189.33
5.1.20.0210.0179.26
5.1.10.0140.0219.27
5.1.00.0300.0139.02
5.0.50.0090.0228.16
5.0.40.0110.0168.09
5.0.30.0110.0228.05
5.0.20.0140.0137.99
5.0.10.0100.0218.02
5.0.00.0130.0257.94
4.4.90.0090.0146.79
4.4.80.0080.0136.81
4.4.70.0110.0156.83
4.4.60.0060.0146.84
4.4.50.0030.0196.80
4.4.40.0110.0256.81
4.4.30.0130.0166.83
4.4.20.0100.0176.87
4.4.10.0050.0156.82
4.4.00.0130.0206.87
4.3.110.0090.0156.80
4.3.100.0120.0136.77
4.3.90.0140.0136.74
4.3.80.0080.0236.76
4.3.70.0130.0156.75
4.3.60.0070.0186.75
4.3.50.0070.0186.74
4.3.40.0050.0206.75
4.3.30.0050.0136.13
4.3.20.0060.0156.16
4.3.10.0170.0126.10
4.3.00.0050.0137.30

preferences:
49.3 ms | 400 KiB | 5 Q