3v4l.org

run code in 300+ PHP versions simultaneously
<?php $id = '9242'; $supergroup = array('9242' => 1, '9243' => 0, '9244' => 2, '9245' => 0); $supergroupnew = []; array_walk_recursive($supergroup, function($item, $key) use(&$id) { if ($key == $id) { $supergroupnew += [ $key => $item ]; } else { $supergroupnew += [ $key => "0" ]; } }); echo "<h1>Original Array:</h1>"; print_r($supergroup); echo "<h1>New Array:</h1>"; print_r($supergroupnew);

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.0070.00718.68
8.3.50.0150.00618.41
8.3.40.0150.00019.00
8.3.30.0040.01118.79
8.3.20.0000.00819.32
8.3.10.0080.00021.85
8.3.00.0000.00723.48
8.2.180.0170.00016.75
8.2.170.0140.00022.96
8.2.160.0110.00719.51
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0050.00220.50
8.2.120.0080.00026.35
8.2.110.0030.00622.18
8.2.100.0090.00317.84
8.2.90.0000.00819.36
8.2.80.0000.00817.97
8.2.70.0030.00517.93
8.2.60.0040.00418.16
8.2.50.0050.00318.10
8.2.40.0030.00519.24
8.2.30.0050.00219.20
8.2.20.0050.00218.14
8.2.10.0040.00418.06
8.2.00.0040.00419.36
8.1.280.0150.00025.92
8.1.270.0080.00021.93
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00620.90
8.1.230.0000.01117.77
8.1.220.0000.00817.79
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0030.00617.23
8.1.180.0080.00018.10
8.1.170.0050.00318.75
8.1.160.0070.00018.90
8.1.150.0040.00418.84
8.1.140.0070.00017.63
8.1.130.0030.00319.07
8.1.120.0000.00717.52
8.1.110.0030.00717.46
8.1.100.0000.00717.49
8.1.90.0030.00317.45
8.1.80.0000.00717.52
8.1.70.0000.00817.44
8.1.60.0000.00817.55
8.1.50.0000.00717.55
8.1.40.0000.00817.53
8.1.30.0000.00917.54
8.1.20.0080.00017.55
8.1.10.0080.00017.58
8.1.00.0090.00017.40
8.0.300.0060.00618.77
8.0.290.0040.00416.63
8.0.280.0030.00318.39
8.0.270.0050.00317.32
8.0.260.0000.00817.20
8.0.250.0050.00316.99
8.0.240.0040.00416.95
8.0.230.0040.00417.09
8.0.220.0070.00016.96
8.0.210.0080.00016.86
8.0.200.0040.00417.04
8.0.190.0040.00417.05
8.0.180.0040.00416.85
8.0.170.0080.00016.96
8.0.160.0070.00016.96
8.0.150.0040.00416.92
8.0.140.0030.00316.95
8.0.130.0000.00513.35
8.0.120.0040.00416.95
8.0.110.0040.00416.93
8.0.100.0080.00016.86
8.0.90.0080.00017.08
8.0.80.0070.01016.89
8.0.70.0080.00016.83
8.0.60.0000.00717.02
8.0.50.0070.00016.79
8.0.30.0120.00417.22
8.0.20.0160.00317.40
8.0.10.0000.00717.15
8.0.00.0160.01016.78
7.4.330.0030.00315.55
7.4.320.0000.00616.62
7.4.300.0030.00316.52
7.4.290.0000.00616.43
7.4.280.0090.00016.57
7.4.270.0100.00016.64
7.4.260.0070.00016.46
7.4.250.0040.00416.59
7.4.240.0040.00416.53
7.4.230.0000.00816.66
7.4.220.0000.00816.41
7.4.210.0060.00816.58
7.4.200.0050.00216.64
7.4.160.0030.01216.57
7.4.140.0110.00717.86
7.4.130.0110.00716.62
7.4.120.0090.01216.52
7.4.110.0160.00616.70
7.4.100.0130.00316.66
7.4.90.0090.01516.45
7.4.80.0040.01419.39
7.4.70.0070.01016.59
7.4.60.0090.00616.39
7.4.50.0000.01516.55
7.4.40.0090.00916.56
7.4.10.0050.01115.02
7.4.00.0080.00814.88
7.3.330.0000.00613.41
7.3.320.0000.00613.35
7.3.310.0000.00716.27
7.3.300.0000.00616.48
7.3.290.0030.00316.43
7.3.280.0060.00916.44
7.3.260.0110.00816.48
7.3.240.0060.01316.53
7.3.230.0090.00616.50
7.3.210.0060.00916.42
7.3.200.0120.01216.45
7.3.190.0000.01616.54
7.3.180.0060.01016.54
7.3.170.0110.00616.52
7.3.160.0100.00716.68
7.3.130.0080.00914.97
7.3.120.0080.00714.79
7.3.110.0100.00814.96
7.3.100.0060.00814.85
7.3.90.0090.00414.79
7.3.80.0080.00814.68
7.3.70.0050.00914.59
7.3.60.0070.00814.70
7.3.50.0070.00714.77
7.3.40.0090.00514.93
7.3.30.0100.00314.89
7.3.20.0060.00916.61
7.3.10.0000.01416.44
7.3.00.0070.00616.73
7.2.330.0130.00616.77
7.2.320.0100.00716.67
7.2.310.0100.01016.66
7.2.300.0100.00716.80
7.2.290.0100.00716.66
7.2.260.0080.01014.94
7.2.250.0090.00515.05
7.2.240.0090.00514.82
7.2.230.0110.00514.95
7.2.220.0060.00615.15
7.2.210.0060.01015.21
7.2.200.0030.01115.12
7.2.190.0070.00714.80
7.2.180.0050.01114.91
7.2.170.0030.01014.90
7.2.160.0060.00714.93
7.2.150.0020.01216.99
7.2.140.0050.00816.94
7.2.130.0030.01016.97
7.2.120.0060.00616.88
7.2.110.0060.00816.71
7.2.100.0070.01016.86
7.2.90.0060.00816.83
7.2.80.0030.01116.93
7.2.70.0080.01116.15
7.2.60.1520.00716.14
7.2.50.0350.00516.17
7.2.40.0350.00816.35
7.2.30.0520.00516.25
7.2.20.0390.00616.22
7.2.10.0320.00616.18
7.2.00.0050.01016.17
7.1.330.0060.01015.99
7.1.320.0060.00915.80
7.1.310.0050.00815.93
7.1.300.0030.01015.78
7.1.290.0020.01015.71
7.1.280.0060.00615.78
7.1.270.0060.00915.71
7.1.260.0050.00715.78
7.1.250.0070.00615.74
7.1.240.0060.00815.87
7.1.230.0080.00615.74
7.1.220.0050.00715.91
7.1.210.0120.00515.79
7.1.200.0060.00615.77
7.1.190.0090.00515.77
7.1.180.0000.01215.86
7.1.170.1120.00815.07
7.1.160.0440.00615.00
7.1.150.0440.00615.05
7.1.140.0320.00615.04
7.1.130.0300.00815.14
7.1.120.0490.00615.08
7.1.110.0080.00815.04
7.1.100.0060.00814.93
7.1.90.0230.01015.21
7.1.80.0430.00915.00
7.1.70.0320.00715.19
7.1.60.0100.01021.15
7.1.50.0330.00921.18
7.1.40.0120.00921.19
7.1.30.0330.00921.07
7.1.20.0360.00921.05
7.1.10.0200.00715.09
7.1.00.0230.00814.90
7.0.330.0070.00515.38
7.0.320.0070.00715.12
7.0.310.0070.00415.53
7.0.300.0030.01015.20
7.0.290.0030.01015.41
7.0.280.0060.00615.46
7.0.270.0030.01015.38
7.0.260.0050.01015.25
7.0.250.0060.00915.45
7.0.240.0040.01015.30
7.0.230.0070.00715.38
7.0.220.0050.00915.34
7.0.210.0060.00815.31
7.0.200.0090.00515.35
7.0.190.0060.00615.40
7.0.180.0040.01015.40
7.0.170.0040.00815.44
7.0.160.0090.00215.34
7.0.150.0040.00915.32
7.0.140.0060.00615.40
7.0.130.0070.00515.47
7.0.120.0050.01115.32
7.0.110.0050.00815.28
7.0.100.0070.00715.35
7.0.90.0030.00915.49
7.0.80.0070.00715.38
7.0.70.0070.00715.35
7.0.60.0020.00815.29
7.0.50.0040.00615.52
7.0.40.0040.00613.50
7.0.30.0060.00613.30
7.0.20.0090.00413.43
7.0.10.0030.01113.49
7.0.00.0100.00613.30
5.6.400.0020.01314.02
5.6.390.0080.00614.29
5.6.380.0050.01214.31
5.6.370.0050.00614.42
5.6.360.0030.01014.37
5.6.350.0070.00514.53
5.6.340.0050.00714.55
5.6.330.0050.01214.25
5.6.320.0070.00414.40
5.6.310.0020.00914.21
5.6.300.0030.00914.37
5.6.290.0030.00514.34
5.6.280.0080.00514.36
5.6.270.0080.00714.45
5.6.260.0040.01214.24
5.6.250.0030.00814.45
5.6.240.0020.01114.35
5.6.230.0050.00514.46
5.6.220.0050.00714.29
5.6.210.0030.00914.28
5.6.200.0040.00814.25
5.6.190.0030.01114.21
5.6.180.0090.00414.26
5.6.170.0030.01014.08
5.6.160.0050.00914.11
5.6.150.0030.00914.33
5.6.140.0000.01114.62
5.6.130.0100.00314.46
5.6.120.0030.00914.28
5.6.110.0050.00614.23
5.6.100.0110.00514.14
5.6.90.0030.01014.32
5.6.80.0090.00614.21
5.6.70.0100.00514.25
5.6.60.0060.00714.04
5.6.50.0050.00614.25
5.6.40.0050.00914.05
5.6.30.0050.00614.27
5.6.20.0110.00314.09
5.6.10.0080.00314.28
5.6.00.0060.00514.13

preferences:
114.65 ms | 401 KiB | 5 Q