3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a1 = array( '0' => array( 'banner_details' => array( 'id' => 2, 'section_id' => 24 ), 'slide_details' => array( 0 => array( 'id' => 74, 'name' => 'Ads1' ), 1 => array( 'id' => 2, 'name' => 'Ads2' ) ) ), '1' => array( 'banner_details' => array( 'id' => 106, 'section_id' => 92 ), 'slide_details' => array( 0 => array( 'id' => 2001, 'name' => 'Adv1' ), 1 => array( 'id' => 2002, 'name' => 'Adv2' ) ) ) ); $s = []; foreach($a1 as $data){ if (isset($data['banner_details']['section_id'])){ $s[$data['banner_details']['section_id']] = []; if (isset($data['slide_details'])){ foreach($data['slide_details'] as $row){ $s[$data['banner_details']['section_id']][] = $row['id']; } } } } print_r($s);

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.30.0080.00819.43
8.5.20.0070.01019.21
8.5.10.0080.01018.41
8.5.00.0120.00921.73
8.4.180.0090.01221.79
8.4.170.0130.00720.43
8.4.160.0120.00922.19
8.4.150.0080.00516.86
8.4.140.0150.00617.52
8.4.130.0060.01217.50
8.4.120.0100.01020.47
8.4.110.0140.00618.88
8.4.100.0110.01017.72
8.4.90.0110.00920.53
8.4.80.0130.00620.77
8.4.70.0100.00720.57
8.4.60.0170.00520.54
8.4.50.0140.00618.74
8.4.40.0060.01519.44
8.4.30.0160.00320.52
8.4.20.0100.01020.54
8.4.10.0090.00020.32
8.3.300.0110.00920.79
8.3.290.0080.01220.61
8.3.280.0110.00918.42
8.3.270.0120.00816.52
8.3.260.0100.01116.45
8.3.250.0050.00318.86
8.3.240.0100.01016.84
8.3.230.0100.00916.26
8.3.220.0050.00320.68
8.3.210.0040.00416.75
8.3.200.0040.00416.55
8.3.190.0060.00219.14
8.3.180.0120.00819.09
8.3.170.0110.00418.99
8.3.160.0030.00616.86
8.3.150.0140.00417.20
8.3.140.0060.01217.23
8.3.130.0040.00418.44
8.3.120.0080.00018.93
8.3.110.0080.00020.94
8.3.100.0150.00624.06
8.3.90.0080.00026.77
8.3.80.0030.00616.75
8.3.70.0140.00416.63
8.3.60.0040.01116.38
8.3.50.0070.01118.20
8.3.40.0100.01018.80
8.3.30.0000.01518.80
8.3.20.0080.00024.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.300.0120.00922.00
8.2.290.0060.00417.33
8.2.280.0130.00519.91
8.2.270.0070.01116.95
8.2.260.0040.00420.07
8.2.250.0120.00819.17
8.2.240.0090.00018.29
8.2.230.0110.00422.58
8.2.220.0030.00637.54
8.2.210.0110.00326.77
8.2.200.0080.00416.63
8.2.190.0140.00716.58
8.2.180.0060.01225.92
8.2.170.0070.01019.09
8.2.160.0100.00722.96
8.2.150.0000.00725.66
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0020.00521.06
8.2.110.0080.00321.18
8.2.100.0040.00817.84
8.2.90.0080.00018.03
8.2.80.0000.00918.88
8.2.70.0040.00417.93
8.2.60.0000.00818.16
8.2.50.0000.00918.10
8.2.40.0060.00319.30
8.2.30.0000.00817.74
8.2.20.0040.00417.99
8.2.10.0030.00519.25
8.2.00.0070.00019.22
8.1.340.0110.01117.59
8.1.330.0070.00816.11
8.1.320.0120.00723.86
8.1.310.0000.00716.66
8.1.300.0040.01517.89
8.1.290.0000.01030.84
8.1.280.0080.01525.92
8.1.270.0040.00422.19
8.1.260.0060.00326.35
8.1.250.0050.00228.09
8.1.240.0130.00322.15
8.1.230.0040.00720.97
8.1.220.0040.00417.78
8.1.210.0060.00320.57
8.1.200.0030.00617.36
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0000.00818.45
8.1.160.0000.00920.34
8.1.150.0040.00418.63
8.1.140.0070.00018.88
8.1.130.0000.00717.35
8.1.120.0000.00717.43
8.1.110.0000.00817.46
8.1.100.0030.00317.47
8.1.90.0000.00817.48
8.1.80.0040.00417.37
8.1.70.0000.00717.41
8.1.60.0000.00817.62
8.1.50.0030.00517.49
8.1.40.0080.00417.47
8.1.30.0080.00017.67
8.1.20.0000.00817.59
8.1.10.0060.00317.47
8.1.00.0000.00817.37
8.0.300.0030.00320.07
8.0.290.0000.00716.63
8.0.280.0040.00418.49
8.0.270.0000.01016.83
8.0.260.0050.00318.52
8.0.250.0020.00516.82
8.0.240.0070.00016.92
8.0.230.0040.00416.93
8.0.220.0030.00316.79
8.0.210.0020.00516.93
8.0.200.0000.00616.86
8.0.190.0030.00616.84
8.0.180.0000.00716.90
8.0.170.0040.00416.94
8.0.160.0030.00616.86
8.0.150.0070.00016.73
8.0.140.0000.00816.88
8.0.130.0030.00313.30
8.0.120.0000.00816.74
8.0.110.0030.00516.84
8.0.100.0000.00816.75
8.0.90.0030.00516.88
8.0.80.0000.00816.95
8.0.70.0040.00416.66
8.0.60.0030.00516.95
8.0.50.0040.00416.73
8.0.30.0030.00616.92
8.0.20.0000.00816.83
8.0.10.0080.00016.84
8.0.00.0040.00416.98
7.4.330.0000.00515.55
7.4.320.0030.00316.39
7.4.300.0000.00616.59
7.4.290.0000.00716.45
7.4.280.0000.00716.48
7.4.270.0040.00416.53
7.4.260.0000.00513.22
7.4.250.0000.00716.41
7.4.240.0030.00316.50
7.4.230.0040.00416.59
7.4.220.0000.00716.65
7.4.210.0060.00016.46
7.4.200.0040.00416.42
7.4.190.0000.00716.67
7.4.180.0030.00316.66
7.4.160.0000.00716.45
7.4.150.0040.00416.60
7.4.140.0020.00516.61
7.4.130.0040.00416.60
7.4.120.0080.00016.55
7.4.110.0040.00416.55
7.4.100.0070.00016.40
7.4.90.0000.00716.51
7.4.80.0000.00816.53
7.4.70.0000.00816.56
7.4.60.0000.00816.34
7.4.50.0050.00216.29
7.4.40.0070.00016.48
7.4.30.0040.00416.43
7.4.20.0060.00316.50
7.4.10.0000.00716.43
7.4.00.0000.00816.41
7.3.330.0070.00016.28
7.3.320.0030.00313.16
7.3.310.0000.00716.27
7.3.300.0000.00716.21
7.3.290.0000.00816.34
7.3.280.0030.00316.23
7.3.270.0000.00716.34
7.3.260.0040.00416.35
7.3.250.0030.00616.23
7.3.240.0000.00716.30
7.3.230.0070.00016.12
7.3.220.0000.00716.28
7.3.210.0030.00316.25
7.3.200.0030.00316.26
7.3.190.0070.00016.10
7.3.180.0000.00616.24
7.3.170.0080.00016.20
7.3.160.0050.00216.30
7.3.150.0030.00316.30
7.3.140.0030.00616.30
7.3.130.0080.00016.29
7.3.120.0070.00016.28
7.3.110.0000.00716.19
7.3.100.0040.00416.04
7.3.90.0000.00616.55
7.3.80.0030.00616.17
7.3.70.0030.00316.34
7.3.60.0000.00816.43
7.3.50.0030.00316.33
7.3.40.0030.00316.41
7.3.30.0000.00616.39
7.3.20.0000.00716.48
7.3.10.0050.00316.34
7.3.00.0030.00316.27

preferences:
38.5 ms | 1419 KiB | 5 Q