3v4l.org

run code in 300+ PHP versions simultaneously
<?php $all_array = array('a'=>'1', 'b'=>'2', 'c'=>'3', 'd'=>'4', 'e'=>'5'); $find_array = array('b', 'd', 'e'); $new = array(); foreach($find_array as $val){ if(isset($all_array[$val])) $new[$val] = $all_array[$val]; } print_r($new);

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.00.0130.00819.86
8.4.150.0020.00014.05
8.4.140.0130.00917.29
8.4.130.0110.00818.64
8.4.120.0040.00424.00
8.4.110.0110.00818.70
8.4.100.0120.00818.67
8.4.90.0130.00820.63
8.4.80.0140.00618.81
8.4.70.0100.00718.90
8.4.60.0100.00918.81
8.4.50.0160.00520.46
8.4.40.0120.00919.34
8.4.30.0100.01018.79
8.4.20.0180.00420.51
8.4.10.0090.00619.31
8.3.280.0130.00618.41
8.3.270.0160.00516.51
8.3.260.0120.00716.39
8.3.250.0140.00618.85
8.3.240.0070.00417.33
8.3.230.0040.00416.64
8.3.220.0100.00818.83
8.3.210.0100.00818.41
8.3.200.0060.00316.61
8.3.190.0120.00618.90
8.3.180.0100.00916.53
8.3.170.0060.01317.12
8.3.160.0090.00918.25
8.3.150.0090.00916.41
8.3.140.0050.00319.02
8.3.130.0040.00418.39
8.3.120.0060.01318.75
8.3.110.0070.00320.94
8.3.100.0030.00624.06
8.3.90.0000.00826.77
8.3.80.0030.00618.43
8.3.70.0100.00716.37
8.3.60.0070.00718.18
8.3.50.0130.00516.50
8.3.40.0160.00018.71
8.3.30.0090.00618.55
8.3.20.0000.00721.91
8.3.10.0030.00621.92
8.3.00.0080.00023.51
8.2.290.0070.01220.49
8.2.280.0040.00518.20
8.2.270.0070.00717.05
8.2.260.0110.00716.68
8.2.250.0070.00016.49
8.2.240.0000.00817.09
8.2.230.0060.00322.58
8.2.220.0060.00337.54
8.2.210.0110.00326.77
8.2.200.0030.00918.41
8.2.190.0070.00716.75
8.2.180.0140.00318.41
8.2.170.0040.01122.96
8.2.160.0110.00420.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00726.16
8.2.120.0070.00026.16
8.2.110.0030.00622.24
8.2.100.0090.00317.91
8.2.90.0040.00417.91
8.2.80.0040.00417.50
8.2.70.0060.00317.34
8.2.60.0000.00818.03
8.2.50.0060.00318.07
8.2.40.0080.00018.35
8.2.30.0050.00218.10
8.2.20.0000.00718.19
8.2.10.0040.00421.27
8.2.00.0040.00419.30
8.1.330.0110.00821.79
8.1.320.0040.00416.18
8.1.310.0180.00018.53
8.1.300.0080.00318.23
8.1.290.0000.01118.88
8.1.280.0040.01125.92
8.1.270.0040.00423.84
8.1.260.0000.00926.35
8.1.250.0040.00428.09
8.1.240.0030.00622.59
8.1.230.0090.00320.91
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0000.00917.36
8.1.190.0050.00317.36
8.1.180.0000.00818.10
8.1.170.0000.00818.46
8.1.160.0070.00018.88
8.1.150.0040.00418.88
8.1.140.0050.00218.88
8.1.130.0030.00320.24
8.1.120.0030.00317.49
8.1.110.0040.00417.50
8.1.100.0040.00717.45
8.1.90.0030.00517.52
8.1.80.0040.00417.48
8.1.70.0030.00317.48
8.1.60.0000.00717.61
8.1.50.0000.00717.51
8.1.40.0060.00317.55
8.1.30.0030.00517.66
8.1.20.0040.00417.60
8.1.10.0000.00717.46
8.1.00.0050.00217.51
8.0.300.0060.00319.93
8.0.290.0000.00716.63
8.0.280.0000.00718.32
8.0.270.0040.00316.75
8.0.260.0000.00618.46
8.0.250.0000.00716.92
8.0.240.0060.00016.84
8.0.230.0040.00416.93
8.0.220.0030.00316.86
8.0.210.0000.00716.84
8.0.200.0000.00616.93
8.0.190.0000.00716.92
8.0.180.0050.00316.89
8.0.170.0030.00616.92
8.0.160.0070.00016.80
8.0.150.0000.00716.88
8.0.140.0080.00016.82
8.0.130.0000.00613.24
8.0.120.0000.00716.77
8.0.110.0000.00716.93
8.0.100.0040.00416.79
8.0.90.0050.00316.78
8.0.80.0030.01216.87
8.0.70.0050.00216.86
8.0.60.0030.00516.79
8.0.50.0000.00716.74
8.0.30.0100.00816.98
8.0.20.0060.01317.04
8.0.10.0070.00016.89
8.0.00.0070.01216.70
7.4.330.0000.00515.55
7.4.320.0030.00316.54
7.4.300.0000.00616.49
7.4.290.0040.00416.38
7.4.280.0070.00016.47
7.4.270.0030.00316.53
7.4.260.0070.00016.51
7.4.250.0000.00716.45
7.4.240.0020.00616.45
7.4.230.0080.00016.38
7.4.220.0040.00416.57
7.4.210.0110.00416.60
7.4.200.0070.00016.38
7.4.160.0070.01116.55
7.4.130.0060.01416.67
7.4.120.0060.01016.54
7.4.110.0030.01516.51
7.4.100.0040.01416.59
7.4.90.0060.01216.58
7.4.80.0060.01519.39
7.4.70.0060.01516.52
7.4.60.0120.00416.57
7.4.50.0090.00916.41
7.4.40.0100.00716.60
7.4.00.0000.01314.93
7.3.330.0060.00013.16
7.3.320.0000.00513.16
7.3.310.0000.00716.37
7.3.300.0040.00416.31
7.3.290.0060.00016.17
7.3.280.0060.01016.29
7.3.260.0130.00716.50
7.3.240.0090.00916.42
7.3.230.0030.01316.27
7.3.210.0060.01016.41
7.3.200.0060.01316.52
7.3.190.0120.00816.29
7.3.180.0000.02116.46
7.3.170.0070.01116.31
7.3.160.0120.00616.49
7.3.60.0080.00414.68
7.3.50.0130.01314.69
7.3.40.0080.00414.32
7.3.30.0080.00814.66
7.3.20.0000.01414.30
7.3.10.0550.01014.22
7.3.00.0130.00414.66
7.2.330.0110.00816.69
7.2.320.0130.01016.66
7.2.310.0070.01016.64
7.2.300.0000.01716.70
7.2.290.0130.01116.73
7.2.190.0140.00314.66
7.2.180.0040.01114.84
7.2.170.0110.00514.84
7.2.160.0100.00714.82
7.2.150.0060.00914.64
7.2.140.0140.01214.60
7.2.130.0090.01415.05
7.2.120.0060.01116.80
7.2.110.0110.00716.27
7.2.100.0070.01016.52
7.2.90.0050.01016.82
7.2.80.0190.00616.87
7.2.70.0220.00416.77
7.2.60.0100.00616.71
7.2.50.0070.01016.89
7.2.40.0140.00316.62
7.2.30.0150.00316.57
7.2.20.0170.01316.37
7.2.10.0150.00016.65
7.2.00.0100.00716.79
7.1.300.0070.00415.48
7.1.290.0130.00313.79
7.1.280.0100.00614.11
7.1.270.0060.01013.72
7.1.260.0050.01313.66
7.1.250.0090.00615.35

preferences:
30.82 ms | 403 KiB | 5 Q