3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrSorted = array( array("sort" => "7", "name" => "Test"), array("sort" => "1", "name" => "Test 2"), array("sort" => "3", "name" => "Test 3"), array("sort" => "5", "name" => "Test 4"), array("sort" => "7", "name" => "Test 4")); $arrNotSorted = array(5,3,7,1); $arrSortedResult = array_intersect_key( array_values(arrSorted), array_keys($arrNotSorted) ); print_r($arrSortedResult);

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.0040.01118.28
8.3.50.0100.00921.92
8.3.40.0110.00418.88
8.3.30.0120.00318.99
8.3.20.0000.00719.93
8.3.10.0080.00021.55
8.3.00.0050.00317.89
8.2.180.0090.00616.75
8.2.170.0120.00322.96
8.2.160.0030.01020.52
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00526.16
8.2.120.0000.00820.93
8.2.110.0070.00322.08
8.2.100.0080.00417.78
8.2.90.0050.00317.96
8.2.80.0000.00819.41
8.2.70.0000.00817.91
8.2.60.0040.00418.04
8.2.50.0050.00518.10
8.2.40.0040.00420.59
8.2.30.0040.00418.35
8.2.20.0030.00617.62
8.2.10.0050.00318.09
8.2.00.0000.00817.79
8.1.280.0090.00925.92
8.1.270.0000.00823.92
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00022.42
8.1.230.0040.00720.84
8.1.220.0060.00317.78
8.1.210.0040.00418.77
8.1.200.0000.00817.48
8.1.190.0060.00317.22
8.1.180.0050.00318.10
8.1.170.0000.00918.59
8.1.160.0000.00722.08
8.1.150.0040.00418.55
8.1.140.0060.00317.46
8.1.130.0030.00317.79
8.1.120.0020.00517.44
8.1.110.0040.00417.34
8.1.100.0000.00717.49
8.1.90.0070.00017.43
8.1.80.0050.00217.48
8.1.70.0000.00717.37
8.1.60.0050.00517.48
8.1.50.0040.00417.42
8.1.40.0060.00317.45
8.1.30.0040.00417.54
8.1.20.0000.00817.58
8.1.10.0050.00217.63
8.1.00.0000.00817.50
8.0.300.0030.00620.10
8.0.290.0070.00016.75
8.0.280.0030.00318.45
8.0.270.0030.00317.94
8.0.260.0030.00517.27
8.0.250.0030.00316.90
8.0.240.0000.00716.88
8.0.230.0040.00316.96
8.0.220.0030.00616.95
8.0.210.0000.00716.99
8.0.200.0000.00716.90
8.0.190.0000.00717.05
8.0.180.0000.00816.97
8.0.170.0030.00516.99
8.0.160.0030.00316.91
8.0.150.0000.00716.91
8.0.140.0000.00716.89
8.0.130.0030.00413.34
8.0.120.0040.00416.89
8.0.110.0000.00716.79
8.0.100.0050.00316.82
8.0.90.0040.00417.02
8.0.80.0100.01016.95
8.0.70.0000.00717.00
8.0.60.0040.00416.98
8.0.50.0040.00416.97
8.0.30.0060.01217.17
8.0.20.0060.01217.40
8.0.10.0030.00516.95
8.0.00.0110.00716.73
7.4.330.0030.00315.00
7.4.320.0000.00616.50
7.4.300.0030.00316.52
7.4.290.0000.00716.61
7.4.280.0030.00516.60
7.4.270.0030.00316.59
7.4.260.0000.00716.58
7.4.250.0050.00216.47
7.4.240.0030.00416.50
7.4.230.0030.00316.63
7.4.220.0210.00416.45
7.4.210.0090.00916.62
7.4.200.0080.00016.42
7.4.160.0110.00616.16
7.4.150.0100.00717.40
7.4.140.0130.00317.86
7.4.130.0090.00916.44
7.4.120.0070.01016.45
7.4.110.0060.01216.45
7.4.100.0090.01216.42
7.4.90.0100.00716.44
7.4.80.0180.00619.39
7.4.70.0130.00416.56
7.4.60.0120.00616.55
7.4.50.0000.00816.41
7.4.40.0080.00816.52
7.4.30.0170.00016.54
7.4.00.0070.01015.16
7.3.330.0000.00512.96
7.3.320.0000.00513.04
7.3.310.0030.00316.03
7.3.300.0070.00016.06
7.3.290.0070.00716.33
7.3.280.0060.01116.18
7.3.270.0110.00717.40
7.3.260.0110.00616.42
7.3.250.0100.00816.19
7.3.240.0090.00916.32
7.3.230.0070.01016.39
7.3.210.0100.00716.23
7.3.200.0110.01119.39
7.3.190.0070.01116.38
7.3.180.0060.00916.43
7.3.170.0040.01216.35
7.3.160.0110.00816.50
7.3.120.0070.01014.82
7.3.00.0040.00816.34
7.2.330.0030.01416.54
7.2.320.0120.00816.51
7.2.310.0060.01616.62
7.2.300.0140.00716.63
7.2.290.0040.01116.59
7.2.130.0140.00316.86
7.2.120.0070.00716.86
7.2.110.0030.01016.64
7.2.100.0030.00916.85
7.2.90.0000.01516.76
7.2.80.0100.00316.83
7.2.70.0100.00316.96
7.2.60.0090.00516.90
7.2.50.0000.01416.79
7.2.40.0090.00616.95
7.2.30.0030.01316.62
7.2.20.0100.00616.93
7.2.10.0060.00916.72
7.2.00.0120.00318.04
7.1.250.0040.00415.55
7.1.240.0070.00715.75
7.1.230.0080.00015.57
7.1.220.0060.00315.84
7.1.210.0030.00915.54
7.1.200.0060.00515.79
7.1.190.0030.00715.77
7.1.180.0100.00315.77
7.1.170.0070.01015.76
7.1.160.0070.00315.71
7.1.150.0070.00715.55
7.1.140.0070.00715.59
7.1.130.0060.00315.84
7.1.120.0000.01215.63
7.1.110.0000.01215.83
7.1.100.0060.00716.75
7.1.90.0060.00915.70
7.1.80.0060.00615.77
7.1.70.0050.00516.25
7.1.60.0050.00717.73
7.1.50.0060.01216.06
7.1.40.0060.00615.95
7.1.30.0030.01015.61
7.1.20.0040.01215.39
7.1.10.0040.00715.67
7.1.00.0070.03918.93
7.0.330.0040.00815.03
7.0.320.0130.00015.22
7.0.310.0090.00015.24
7.0.300.0110.00015.13
7.0.290.0080.00015.21
7.0.280.0060.00614.97
7.0.270.0030.00715.16
7.0.260.0030.00815.13
7.0.250.0040.00715.34
7.0.240.0070.00615.57
7.0.230.0080.00015.53
7.0.220.0080.00015.41
7.0.210.0070.00415.31
7.0.200.0040.00716.06
7.0.190.0000.00715.43
7.0.180.0040.01115.33
7.0.170.0040.00715.49
7.0.160.0050.00515.24
7.0.150.0090.00315.15
7.0.140.0030.04018.54
7.0.130.0000.01415.25
7.0.120.0140.00015.41
7.0.110.0040.01214.84
7.0.100.0000.01415.14
7.0.90.0050.00515.28
7.0.80.0000.01015.39
7.0.70.0090.00015.00
7.0.60.0080.04317.57
7.0.50.0050.02316.52
7.0.40.0060.03016.70
7.0.30.0300.03816.50
7.0.20.0150.02716.74
7.0.10.0080.04316.55
7.0.00.0080.04516.71
5.6.380.0080.00414.44
5.6.370.0060.00913.96
5.6.360.0000.01314.54
5.6.350.0060.00614.04
5.6.340.0040.01114.25
5.6.330.0100.00714.03
5.6.320.0090.00614.24
5.6.310.0090.00014.20
5.6.300.0090.00614.39
5.6.290.0060.00614.21
5.6.280.0060.03617.60
5.6.270.0030.00914.34
5.6.260.0000.01113.89
5.6.250.0060.00614.25
5.6.240.0110.00014.37
5.6.230.0030.00714.41
5.6.220.0090.00614.18
5.6.210.0020.02717.40
5.6.200.0060.03016.19
5.6.190.0150.04217.21
5.6.180.0170.02717.35
5.6.170.0200.01917.20
5.6.160.0030.03217.41
5.6.150.0030.03116.36
5.6.140.0080.02516.20
5.6.130.0000.02916.28
5.6.120.0050.02517.56
5.6.110.0060.04617.55
5.6.100.0110.04217.43
5.6.90.0030.05017.52
5.6.80.0130.03717.34
5.6.70.1660.02517.24
5.6.60.0070.00713.92
5.6.50.0040.00814.08
5.6.40.0100.00313.87
5.6.30.0060.00914.09
5.6.20.0060.00614.25
5.6.10.0000.01214.14
5.6.00.0070.00714.17
5.5.380.0070.00411.18
5.5.370.0040.00411.18
5.5.360.0070.00411.18
5.5.350.0130.02115.79
5.5.340.0050.02314.55
5.5.330.0060.04115.66
5.5.320.0170.02715.84
5.5.310.0160.04415.74
5.5.300.0020.02914.55
5.5.290.0070.03314.60
5.5.280.0060.02416.02
5.5.270.0080.02015.98
5.5.260.0070.02015.96
5.5.250.0070.03515.97
5.5.240.0050.04115.66
5.5.230.0070.00711.18
5.5.220.0030.00311.18
5.5.210.0030.00711.18
5.5.200.0000.01111.18
5.5.190.0000.00611.18
5.5.180.0030.00311.18
5.5.170.0060.00611.18
5.5.160.0030.00311.18
5.5.150.0030.00711.18
5.5.140.0000.01211.18
5.5.130.0030.00311.18
5.5.120.0000.00811.18
5.5.110.0030.00311.18
5.5.100.0120.00011.18
5.5.90.0000.00711.18
5.5.80.0040.00811.18
5.5.70.0040.00711.18
5.5.60.0000.00711.18
5.5.50.0060.00011.18
5.5.40.0000.01311.18
5.5.30.0070.00411.18
5.5.20.0070.00011.18
5.5.10.0110.00011.18
5.5.00.0040.01111.18
5.4.450.0660.02415.32
5.4.440.0400.02015.21
5.4.430.0550.02115.30
5.4.420.0110.02015.37
5.4.410.0450.02215.14
5.4.400.0320.02515.05
5.4.390.0520.02415.21
5.4.380.0360.03314.87
5.4.370.0500.02814.83
5.4.360.0480.04514.88
5.4.350.0610.03714.89
5.4.340.0500.02814.87
5.4.330.0000.01111.18
5.4.320.0050.02811.82
5.4.310.0050.02011.82
5.4.300.0060.01911.82
5.4.290.0080.01911.81
5.4.280.0050.02111.76
5.4.270.0070.02111.76
5.4.260.0040.02711.76
5.4.250.0060.02311.76
5.4.240.0040.02411.76
5.4.230.0020.02511.76
5.4.220.0080.01911.76
5.4.210.0050.02211.76
5.4.200.0030.02311.76
5.4.190.0080.01911.76
5.4.180.0040.02511.76
5.4.170.0060.01911.76
5.4.160.0070.02211.76
5.4.150.0070.02611.76
5.4.140.0070.02411.60
5.4.130.0070.01911.59
5.4.120.0060.02011.57
5.4.110.0040.02111.57
5.4.100.0080.01811.57
5.4.90.0080.02211.57
5.4.80.0050.02111.57
5.4.70.0070.01811.57
5.4.60.0070.01911.57
5.4.50.0050.02211.57
5.4.40.0060.02211.56
5.4.30.0060.02311.56
5.4.20.0050.02211.56
5.4.10.0060.02111.56
5.4.00.0050.02311.30
5.3.290.0070.02111.99
5.3.280.0050.02111.94
5.3.270.0040.02511.95
5.3.260.0040.02111.95
5.3.250.0080.01911.95
5.3.240.0050.02211.95
5.3.230.0020.02611.94
5.3.220.0060.02111.93
5.3.210.0080.02011.93
5.3.200.0040.02311.93
5.3.190.0050.02011.93
5.3.180.0040.02311.93
5.3.170.0040.02111.92
5.3.160.0060.02111.92
5.3.150.0060.01911.92
5.3.140.0040.02211.92
5.3.130.0060.02611.92
5.3.120.0050.02111.92
5.3.110.0040.02211.92
5.3.100.0020.02311.65
5.3.90.0020.02411.63
5.3.80.0080.01811.63
5.3.70.0050.02111.63
5.3.60.0050.01911.62
5.3.50.0040.02211.59
5.3.40.0030.02411.59
5.3.30.0070.01911.56
5.3.20.0060.02011.45
5.3.10.0070.02411.43
5.3.00.0060.02111.43
5.2.170.0050.02010.18
5.2.160.0040.01710.18
5.2.150.0030.01910.18
5.2.140.0060.01410.18
5.2.130.0040.01810.16
5.2.120.0060.01510.16
5.2.110.0050.01610.16
5.2.100.0050.01510.16
5.2.90.0040.01710.16
5.2.80.0040.01710.16
5.2.70.0040.02210.16
5.2.60.0070.02110.13
5.2.50.0060.01810.12
5.2.40.0040.02010.11
5.2.30.0060.02110.10
5.2.20.0030.01610.09
5.2.10.0030.01810.05
5.2.00.0040.0169.98
5.1.60.0060.0129.62
5.1.50.0060.0179.62
5.1.40.0080.0149.61
5.1.30.0040.0169.79
5.1.20.0050.0169.80
5.1.10.0050.0179.66
5.1.00.0050.0159.66
5.0.50.0030.0128.90
5.0.40.0050.0098.83
5.0.30.0020.0198.73
5.0.20.0060.0098.72
5.0.10.0020.0148.71
5.0.00.0040.0168.71
4.4.90.0020.0107.98
4.4.80.0020.0097.97
4.4.70.0010.0117.96
4.4.60.0020.0107.96
4.4.50.0010.0107.97
4.4.40.0030.0137.94
4.4.30.0030.0077.97
4.4.20.0010.0128.01
4.4.10.0010.0128.01
4.4.00.0030.0137.97
4.3.110.0010.0117.92
4.3.100.0010.0127.92
4.3.90.0020.0097.90
4.3.80.0030.0147.88
4.3.70.0030.0107.90
4.3.60.0010.0107.90
4.3.50.0010.0107.90
4.3.40.0010.0157.85
4.3.30.0020.0097.23
4.3.20.0030.0107.22
4.3.10.0010.0107.20
4.3.00.0080.00813.06

preferences:
47.52 ms | 401 KiB | 5 Q