3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myArr = array ( array ( "User" => array ( "id" => 2, "feature" => "AddUser", "feature_level" => 1, "parent_feature" => 1 ) ), array ( "User" => array ( "id" => 3, "feature" => "EditUser", "feature_level" => 1, "parent_feature" => 1 ) ), array ( "Candidate" => array ( "id" => 5, "feature" => "AddCandidate", "feature_level" => 1, "parent_feature" => 4 ) ), array ( "Candidate" => array ( "id" => 6, "feature" => "EditCandidate", "feature_level" => 1, "parent_feature" => 4 ) ) ); $result_arr = []; array_walk($myArr,function($v,$k) use (&$result_arr){ $result_arr[key($v)][] = $v[key($v)]; }); print_r($result_arr);

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.0090.00618.31
8.3.50.0110.00722.07
8.3.40.0130.00318.92
8.3.30.0000.01418.80
8.3.20.0050.00320.20
8.3.10.0040.00421.91
8.3.00.0030.00619.38
8.2.180.0130.00618.16
8.2.170.0100.01018.93
8.2.160.0140.00422.96
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00420.95
8.2.110.0030.00721.04
8.2.100.0150.00718.14
8.2.90.0160.00418.83
8.2.80.0130.00618.21
8.2.70.0160.00518.03
8.2.60.0120.00818.19
8.2.50.0130.00718.27
8.2.40.0160.00219.43
8.2.30.0100.00418.26
8.2.20.0100.00618.11
8.2.10.0110.00418.32
8.2.00.0100.00618.32
8.1.280.0140.00425.92
8.1.270.0040.00423.91
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0050.00523.83
8.1.230.0130.00518.01
8.1.220.0130.00418.11
8.1.210.0110.00518.61
8.1.200.0110.00817.90
8.1.190.0090.00717.89
8.1.180.0090.00718.27
8.1.170.0110.00518.55
8.1.160.0110.00418.73
8.1.150.0080.00819.58
8.1.140.0110.00519.01
8.1.130.0090.00718.10
8.1.120.0070.00717.94
8.1.110.0110.00517.77
8.1.100.0070.00817.79
8.1.90.0120.00517.79
8.1.80.0160.00017.79
8.1.70.0140.00217.76
8.1.60.0100.00617.84
8.1.50.0040.01217.84
8.1.40.0120.00417.85
8.1.30.0130.00317.89
8.1.20.0100.00617.90
8.1.10.0130.00417.79
8.1.00.0070.00717.71
8.0.300.0100.00318.61
8.0.290.0170.00017.60
8.0.280.0140.00118.44
8.0.270.0080.00617.81
8.0.260.0070.00817.79
8.0.250.0100.00617.64
8.0.240.0090.00617.42
8.0.230.0080.00717.40
8.0.220.0070.00717.42
8.0.210.0100.00517.37
8.0.200.0110.00417.43
8.0.190.0120.00317.41
8.0.180.0100.00717.38
8.0.170.0110.00417.41
8.0.160.0100.00517.43
8.0.150.0060.00817.38
8.0.140.0120.00417.33
8.0.130.0090.00516.18
8.0.120.0110.00417.37
8.0.110.0130.00317.40
8.0.100.0130.00417.29
8.0.90.0100.00617.37
8.0.80.0100.00717.23
8.0.70.0170.00317.38
8.0.60.0120.00617.36
8.0.50.0140.00517.36
8.0.30.0100.00717.30
8.0.20.0080.01117.41
8.0.10.0130.00517.50
8.0.00.0130.00517.30
7.4.330.0120.00116.77
7.4.320.0100.00517.08
7.4.300.0100.00617.17
7.4.290.0140.00317.19
7.4.280.0110.00517.13
7.4.270.0110.00417.17
7.4.260.0130.00417.11
7.4.250.0140.00217.14
7.4.240.0120.00417.11
7.4.230.0110.00517.24
7.4.220.0150.00517.14
7.4.210.0100.00816.91
7.4.200.0120.00717.20
7.4.190.0110.00817.15
7.4.180.0140.00417.10
7.4.160.0140.00516.94
7.4.150.0110.00917.18
7.4.140.0120.00617.43
7.4.130.0140.00716.81
7.4.120.0140.00516.88
7.4.110.0150.00416.89
7.4.100.0110.00717.01
7.4.90.0110.00616.93
7.4.80.0090.01017.41
7.4.70.0100.00916.83
7.4.60.0110.00716.78
7.4.50.0110.00616.74
7.4.40.0120.00716.85
7.4.30.0100.00916.84
7.4.20.0100.00916.80
7.4.10.0130.00616.40
7.4.00.0100.00816.37
7.3.330.0130.00416.05
7.3.320.0150.00315.95
7.3.310.0100.00717.04
7.3.300.0140.00417.05
7.3.290.0180.00316.98
7.3.280.0120.00616.66
7.3.270.0140.00817.17
7.3.260.0110.00916.79
7.3.250.0120.00816.76
7.3.240.0120.00816.84
7.3.230.0140.00716.88
7.3.220.0160.00416.95
7.3.210.0160.00516.85
7.3.200.0120.00916.92
7.3.190.0160.00516.80
7.3.180.0140.00616.78
7.3.170.0120.00816.75
7.3.160.0140.00616.76
7.3.150.0150.00616.90
7.3.140.0110.00716.74
7.3.130.0140.00516.45
7.3.120.0080.00916.43
7.3.110.0090.00916.44
7.3.100.0080.01016.13
7.3.90.0120.00516.16
7.3.80.0090.00816.27
7.3.70.0110.00816.26
7.3.60.0110.00716.20
7.3.50.0090.00816.25
7.3.40.0080.00916.26
7.3.30.0100.00716.15
7.3.20.0120.00516.78
7.3.10.0140.00716.75
7.3.00.0090.00816.70
7.2.340.0140.01117.08
7.2.330.0180.00616.95
7.2.320.0160.00916.89
7.2.310.0130.00916.82
7.2.300.0170.00616.84
7.2.290.0120.00916.78
7.2.280.0170.00816.96
7.2.270.0130.00916.84
7.2.260.0120.00816.47
7.2.250.0110.01016.47
7.2.240.0130.00716.54
7.2.230.0140.00816.27
7.2.220.0110.00816.28
7.2.210.0110.00916.28
7.2.200.0140.00916.31
7.2.190.0120.00716.22
7.2.180.0100.00916.35
7.2.170.0100.00916.40
7.2.160.0110.00716.34
7.2.150.0100.00916.83
7.2.140.0130.00716.86
7.2.130.0150.00716.96
7.2.120.0120.00916.89
7.2.110.0120.00716.89
7.2.100.0140.00616.96
7.2.90.0120.00816.95
7.2.80.0110.00916.84
7.2.70.0120.00816.88
7.2.60.0140.00716.90
7.2.50.0130.00616.93
7.2.40.0120.00716.95
7.2.30.0190.00717.02
7.2.20.0120.00716.94
7.2.10.0120.01016.87
7.2.00.0140.00616.89
7.1.330.0160.00716.33
7.1.320.0130.00616.00
7.1.310.0160.00616.06
7.1.300.0130.00615.96
7.1.290.0160.00715.90
7.1.280.0130.00516.04
7.1.270.0120.00715.98
7.1.260.0160.00715.98
7.1.250.0110.00915.94
7.1.240.0120.00816.05
7.1.230.0120.00715.98
7.1.220.0140.00515.90
7.1.210.0170.00316.00
7.1.200.0120.00515.93
7.1.190.0160.00616.01
7.1.180.0100.01115.94
7.1.170.0130.00715.96
7.1.160.0140.00615.97
7.1.150.0150.00615.96
7.1.140.0120.00915.97
7.1.130.0150.00815.97
7.1.120.0130.00815.98
7.1.110.0140.00915.93
7.1.100.0260.00915.90
7.1.90.0250.00616.01
7.1.80.0250.00915.97
7.1.70.0230.00715.89
7.1.60.0250.00818.00
7.1.50.0260.00917.91
7.1.40.0240.00817.77
7.1.30.0260.00717.86
7.1.20.0260.00917.88
7.1.10.0270.00715.90
7.1.00.0230.00915.88
7.0.330.0140.00815.76
7.0.320.0160.00815.76
7.0.310.0170.00515.78
7.0.300.0190.00615.79
7.0.290.0180.00615.80
7.0.280.0150.00915.70
7.0.270.0170.00615.73
7.0.260.0150.00815.71
7.0.250.0150.00715.82
7.0.240.0260.01015.69
7.0.230.0270.00815.74
7.0.220.0330.00715.71
7.0.210.0280.00715.58
7.0.200.0280.00715.68
7.0.190.0270.00815.72
7.0.180.0290.00615.65
7.0.170.0260.00815.65
7.0.160.0310.00715.61
7.0.150.0280.00815.62
7.0.140.0330.00615.64
7.0.130.0300.00715.68
7.0.120.0310.00815.75
7.0.110.0310.00815.63
7.0.100.0280.00815.60
7.0.90.0300.00715.58
7.0.80.0280.00815.64
7.0.70.0280.00915.65
7.0.60.0330.00715.74
7.0.50.0360.00915.68
7.0.40.0270.01015.72
7.0.30.0310.00815.66
7.0.20.0270.00615.69
7.0.10.0250.00815.69
7.0.00.0290.00715.62
5.6.400.0090.01415.96
5.6.390.0130.01016.00
5.6.380.0120.01116.08
5.6.370.0160.00816.05
5.6.360.0150.00916.03
5.6.350.0170.00715.97
5.6.340.0130.01016.03
5.6.330.0150.00815.96
5.6.320.0140.00916.02
5.6.310.0190.00716.09
5.6.300.0140.01917.20
5.6.290.0150.02017.25
5.6.280.0140.01817.25
5.6.270.0150.01717.20
5.6.260.0130.02117.15
5.6.250.0130.01817.17
5.6.240.0120.01917.20
5.6.230.0150.01817.22
5.6.220.0150.01717.26
5.6.210.0140.01817.28
5.6.200.0180.02117.23
5.6.190.0130.01817.31
5.6.180.0120.02317.21
5.6.170.0110.02117.22
5.6.160.0150.01717.26
5.6.150.0130.02017.24
5.6.140.0120.02117.27
5.6.130.0120.01917.19
5.6.120.0140.02117.27
5.6.110.0130.02017.22
5.6.100.0150.02117.25
5.6.90.0140.01917.28
5.6.80.0140.01817.00
5.6.70.0180.01417.04
5.6.60.0110.02017.03
5.6.50.0140.01816.96
5.6.40.0120.01817.00
5.6.30.0120.01816.99
5.6.20.0120.01917.03
5.6.10.0140.01617.05
5.6.00.0130.01617.02
5.5.380.0140.01816.43
5.5.370.0130.01816.41
5.5.360.0150.01816.39
5.5.350.0140.01816.36
5.5.340.0140.01816.47
5.5.330.0160.01616.53
5.5.320.0130.02016.49
5.5.310.0130.02116.47
5.5.300.0120.02116.49
5.5.290.0140.01916.34
5.5.280.0110.02416.44
5.5.270.0140.01916.39
5.5.260.0130.02116.50
5.5.250.0140.01916.48
5.5.240.0150.01816.34
5.5.230.0140.01816.36
5.5.220.0110.01916.28
5.5.210.0140.01816.33
5.5.200.0120.01816.24
5.5.190.0150.01716.25
5.5.180.0170.01516.30
5.5.170.0140.00815.95
5.5.160.0130.01716.27
5.5.150.0140.01616.26
5.5.140.0130.01816.28
5.5.130.0120.01816.29
5.5.120.0130.01716.29
5.5.110.0110.01916.21
5.5.100.0120.01816.32
5.5.90.0130.01716.27
5.5.80.0100.02016.33
5.5.70.0140.01816.36
5.5.60.0110.02016.25
5.5.50.0120.01916.24
5.5.40.0130.01816.25
5.5.30.0130.01816.17
5.5.20.0110.02016.27
5.5.10.0130.01816.22
5.5.00.0150.01616.24

preferences:
35.55 ms | 401 KiB | 5 Q