3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = Array( '0' => Array('id' => '5', 'class' => 'A'), '1' => Array('id' => '53', 'class' => 'B'), '2' => Array('id' => '2', 'class' => 'C'), ); foreach ($array as $key => $values) { $array[$key]['description'] = 'dadadadad'; if ($values['class'] == 'B') { $array = array_intersect_key($array, array_flip(Array($key))); } } var_dump($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.0100.01016.63
8.3.50.0140.00719.73
8.3.40.0100.00318.70
8.3.30.0070.01019.22
8.3.20.0040.00420.29
8.3.10.0050.00323.43
8.3.00.0050.00517.50
8.2.180.0070.00716.63
8.2.170.0040.01122.96
8.2.160.0120.00320.27
8.2.150.0050.00224.18
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0050.00321.10
8.2.110.0050.00520.47
8.2.100.0080.00417.72
8.2.90.0000.00818.34
8.2.80.0040.00417.97
8.2.70.0040.00417.75
8.2.60.0050.00317.93
8.2.50.0040.00418.07
8.2.40.0030.00618.28
8.2.30.0070.00018.17
8.2.20.0090.00017.79
8.2.10.0040.00418.11
8.2.00.0040.00417.68
8.1.280.0000.01525.92
8.1.270.0000.00923.92
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00922.11
8.1.230.0060.00620.82
8.1.220.0000.00817.74
8.1.210.0050.00319.00
8.1.200.0030.00717.35
8.1.190.0040.00417.35
8.1.180.0030.00518.10
8.1.170.0080.00018.51
8.1.160.0050.00321.93
8.1.150.0020.00519.00
8.1.140.0070.00017.50
8.1.130.0000.00717.83
8.1.120.0030.00317.46
8.1.110.0040.00417.45
8.1.100.0070.00017.48
8.1.90.0070.00017.46
8.1.80.0040.00417.44
8.1.70.0000.00717.44
8.1.60.0000.00817.48
8.1.50.0030.00617.54
8.1.40.0030.00517.57
8.1.30.0000.00917.64
8.1.20.0050.00217.66
8.1.10.0030.00617.52
8.1.00.0000.00717.40
8.0.300.0000.00920.09
8.0.290.0040.00416.63
8.0.280.0060.00318.36
8.0.270.0000.00816.71
8.0.260.0030.00317.18
8.0.250.0030.00316.90
8.0.240.0030.00616.82
8.0.230.0070.00016.89
8.0.220.0020.00516.94
8.0.210.0030.00316.88
8.0.200.0000.00616.95
8.0.190.0000.00716.83
8.0.180.0040.00416.80
8.0.170.0000.00716.93
8.0.160.0030.00316.90
8.0.150.0000.00716.84
8.0.140.0000.00916.74
8.0.130.0030.00313.29
8.0.120.0000.00716.76
8.0.110.0000.00716.94
8.0.100.0050.00216.75
8.0.90.0030.00516.71
8.0.80.0090.01216.94
8.0.70.0040.00416.79
8.0.60.0030.00516.83
8.0.50.0040.00417.00
8.0.30.0070.01217.21
8.0.20.0090.01017.40
8.0.10.0040.00416.98
8.0.00.0140.00716.75
7.4.330.0030.00315.00
7.4.320.0000.00616.52
7.4.300.0000.00616.50
7.4.290.0000.00716.62
7.4.280.0000.00716.55
7.4.270.0030.00316.61
7.4.260.0000.00716.52
7.4.250.0030.00616.34
7.4.240.0050.00216.53
7.4.230.0050.00216.50
7.4.220.0030.01316.70
7.4.210.0150.00016.67
7.4.200.0070.00016.56
7.4.160.0030.01316.61
7.4.150.0090.00917.40
7.4.140.0120.00617.86
7.4.130.0110.00816.52
7.4.120.0130.00916.48
7.4.110.0120.00416.37
7.4.100.0100.00716.39
7.4.90.0140.00416.60
7.4.80.0090.01719.39
7.4.70.0060.01516.54
7.4.60.0040.01316.53
7.4.50.0000.00616.55
7.4.40.0080.00816.44
7.4.30.0190.00316.63
7.4.00.0040.01114.65
7.3.330.0040.00413.21
7.3.320.0020.00213.17
7.3.310.0030.00316.26
7.3.300.0030.00316.22
7.3.290.0050.00216.29
7.3.280.0080.00616.30
7.3.270.0100.00717.40
7.3.260.0170.00016.30
7.3.250.0050.01316.40
7.3.240.0080.00816.39
7.3.230.0060.00916.39
7.3.210.0100.00716.27
7.3.200.0140.00319.39
7.3.190.0120.00916.61
7.3.180.0040.01116.63
7.3.170.0110.01116.43
7.3.160.0060.00916.67
7.2.330.0140.01116.76
7.2.320.0100.01416.78
7.2.310.0110.00616.75
7.2.300.0140.00416.73
7.2.290.0030.01416.52
7.2.00.0100.01019.27
7.1.200.0080.00315.77
7.1.100.0060.00618.34
7.1.70.0030.01017.06
7.1.60.0150.00919.40
7.1.50.0210.01834.72
7.1.00.0030.07722.28
7.0.200.0040.00416.85
7.0.140.0070.07322.12
7.0.60.0070.06319.92
7.0.50.0070.04717.90
7.0.40.0170.06319.96
7.0.30.0230.07320.02
7.0.20.0270.07720.21
7.0.10.0130.06720.02
7.0.00.0130.08020.30
5.6.280.0170.06021.02
5.6.210.0130.06320.72
5.6.200.0200.07318.24
5.6.190.0070.04320.41
5.6.180.0270.05020.61
5.6.170.0200.04320.49
5.6.160.0100.08020.38
5.6.150.0130.04718.09
5.6.140.0070.05718.12
5.6.130.0000.04318.21
5.6.120.0070.05021.11
5.6.110.0200.07021.11
5.6.100.0200.07720.99
5.6.90.0070.09020.98
5.6.80.0070.08320.52
5.5.350.4270.04020.43
5.5.340.0030.05017.91
5.5.330.0100.07020.56
5.5.320.0400.05320.28
5.5.310.0330.06720.27
5.5.300.0130.07317.91
5.5.290.0070.08317.88
5.5.280.0100.05020.88
5.5.270.0100.07320.83
5.5.260.0070.07020.97
5.5.250.0100.04020.57
5.5.240.0130.07320.34
5.4.450.0730.05719.52
5.4.440.0300.05319.29
5.4.430.0130.06019.64
5.4.420.0230.04719.53
5.4.410.0030.06319.47
5.4.400.0200.05018.96
5.4.390.0230.05319.32
5.4.380.0100.05018.66
5.4.370.0200.03318.47
5.4.360.0070.03718.53
5.4.350.0090.03511.97
5.4.340.0040.03811.97
5.4.320.0060.04612.46
5.4.310.0060.03912.45
5.4.300.0030.04012.45
5.4.290.0080.03512.45
5.4.280.0050.03612.35
5.4.270.0070.03512.35
5.4.260.0110.03712.35
5.4.250.0060.03812.35
5.4.240.0080.03912.35
5.4.230.0050.04312.34
5.4.220.0020.04312.34
5.4.210.0050.03612.34
5.4.200.0070.04412.34
5.4.190.0070.03812.34
5.4.180.0040.03812.34
5.4.170.0110.03312.35
5.4.160.0090.04412.34
5.4.150.0090.03412.34
5.4.140.0070.05012.02
5.4.130.0060.03512.01
5.4.120.0060.03411.97
5.4.110.0050.03711.96
5.4.100.0010.04011.97
5.4.90.0010.04511.97
5.4.80.0060.03811.96
5.4.70.0060.03411.96
5.4.60.0090.03611.96
5.4.50.0060.03611.96
5.4.40.0070.03311.95
5.4.30.0080.03311.95
5.4.20.0070.03811.95
5.4.10.0040.03611.95
5.4.00.0050.03811.44
5.3.290.0070.03912.80
5.3.280.0030.04512.71
5.3.270.0060.04012.72
5.3.260.0060.03912.72
5.3.250.0040.03912.72
5.3.240.0100.03312.72
5.3.230.0130.03112.71
5.3.220.0050.03812.68
5.3.210.0040.04112.68
5.3.200.0030.03912.68
5.3.190.0080.03512.68
5.3.180.0060.03612.67
5.3.170.0060.03712.66
5.3.160.0080.03612.68
5.3.150.0060.05312.68
5.3.140.0050.03812.66
5.3.130.0040.04212.66
5.3.120.0080.04012.66
5.3.110.0040.04112.66
5.3.100.0050.03812.12
5.3.90.0040.04512.09
5.3.80.0110.03212.07
5.3.70.0090.03612.08
5.3.60.0040.03912.07
5.3.50.0070.03612.00
5.3.40.0060.03712.00
5.3.30.0060.03611.94
5.3.20.0070.03511.73
5.3.10.0050.03611.69
5.3.00.0050.03711.68
5.2.170.0050.0319.18
5.2.160.0040.0319.18
5.2.150.0060.0299.18
5.2.140.0070.0299.18
5.2.130.0040.0359.14
5.2.120.0070.0269.14
5.2.110.0050.0359.14
5.2.100.0060.0289.14
5.2.90.0070.0279.14
5.2.80.0040.0439.14
5.2.70.0030.0439.14
5.2.60.0050.0369.09
5.2.50.0070.0329.06
5.2.40.0030.0309.03
5.2.30.0040.0309.01
5.2.20.0040.0319.00
5.2.10.0060.0288.93
5.2.00.0060.0308.80
5.1.60.0050.0268.09
5.1.50.0060.0248.08
5.1.40.0040.0258.06
5.1.30.0050.0278.41
5.1.20.0010.0308.43
5.1.10.0060.0248.16
5.1.00.0030.0268.16
5.0.50.0040.0206.62
5.0.40.0040.0196.48
5.0.30.0030.0316.30
5.0.20.0020.0206.26
5.0.10.0040.0196.24
5.0.00.0030.0316.24
4.4.90.0030.0154.78
4.4.80.0050.0134.75
4.4.70.0010.0174.75
4.4.60.0050.0134.75
4.4.50.0040.0134.77
4.4.40.0020.0274.71
4.4.30.0010.0174.75
4.4.20.0030.0154.84
4.4.10.0030.0154.85
4.4.00.0040.0244.76
4.3.110.0020.0174.67
4.3.100.0010.0174.66
4.3.90.0030.0144.63
4.3.80.0020.0244.58
4.3.70.0020.0154.63
4.3.60.0020.0154.63
4.3.50.0030.0154.63
4.3.40.0040.0224.54
4.3.30.0040.0143.30
4.3.20.0030.0153.27
4.3.10.0000.0173.23
4.3.00.0130.0207.18

preferences:
54.5 ms | 400 KiB | 5 Q