3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array( "type" => "a", "value" => 1 ), array( "type" => "a", "value" => 2 ), array( "type" => "a", "value" => 3 ), array( "type" => "b", "value" => 1 ), array( "type" => "b", "value" => 2 ),array( "type" => "b", "value" => 4 ), array( "type" => "f", "value" => 2 ) ); foreach ($array as $element) $newArray[$element["type"]][] = $element["value"]; var_export($newArray);

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.130.0080.00018.45
8.3.120.0100.00019.01
8.3.110.0030.00620.94
8.3.100.0080.00424.06
8.3.90.0080.01126.77
8.3.80.0060.00318.31
8.3.70.0110.01116.50
8.3.60.0100.01018.56
8.3.50.0120.01022.04
8.3.40.0070.00718.59
8.3.30.0070.00718.81
8.3.20.0040.00420.34
8.3.10.0050.00323.71
8.3.00.0070.00022.34
8.2.250.0040.00418.25
8.2.240.0060.00317.16
8.2.230.0040.00422.58
8.2.220.0040.00437.54
8.2.210.0030.01226.77
8.2.200.0040.00418.16
8.2.190.0070.00716.58
8.2.180.0160.00318.54
8.2.170.0150.00022.96
8.2.160.0140.00022.01
8.2.150.0000.00824.18
8.2.140.0060.00324.66
8.2.130.0000.00726.16
8.2.120.0040.00419.48
8.2.110.0060.00321.03
8.2.100.0030.00717.89
8.2.90.0060.00518.66
8.2.80.0140.00317.70
8.2.70.0190.00017.75
8.2.60.0120.00717.72
8.2.50.0140.00617.91
8.2.40.0170.00318.40
8.2.30.0190.00217.63
8.2.20.0060.00617.64
8.2.10.0140.00318.52
8.2.00.0160.00117.52
8.1.300.0120.00417.56
8.1.290.0050.00530.84
8.1.280.0130.00625.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0110.00317.29
8.1.230.0040.00821.04
8.1.220.0150.00317.49
8.1.210.0180.00317.91
8.1.200.0150.00417.11
8.1.190.0120.00517.16
8.1.180.0150.00317.49
8.1.170.0140.00517.73
8.1.160.0070.01119.59
8.1.150.0140.00417.86
8.1.140.0070.00317.23
8.1.130.0120.00517.61
8.1.120.0110.00717.29
8.1.110.0100.00817.39
8.1.100.0100.00817.37
8.1.90.0100.00717.35
8.1.80.0120.00517.30
8.1.70.0090.00717.42
8.1.60.0130.00417.43
8.1.50.0090.00817.39
8.1.40.0140.00417.50
8.1.30.0130.00517.58
8.1.20.0140.00417.51
8.1.10.0160.00117.32
8.1.00.0130.00517.36
8.0.300.0100.00718.23
8.0.290.0120.00616.71
8.0.280.0170.00017.62
8.0.270.0160.00116.85
8.0.260.0120.00616.76
8.0.250.0100.00916.88
8.0.240.0160.00216.86
8.0.230.0190.00116.81
8.0.220.0130.00616.78
8.0.210.0090.00616.76
8.0.200.0100.00816.90
8.0.190.0130.00516.90
8.0.180.0170.00516.83
8.0.170.0150.00316.80
8.0.160.0140.00316.79
8.0.150.0160.00216.81
8.0.140.0140.00416.77
8.0.130.0130.00415.05
8.0.120.0160.00216.82
8.0.110.0120.00416.75
8.0.100.0100.00816.89
8.0.90.0140.00416.86
8.0.80.0120.00917.43
8.0.70.0130.00516.84
8.0.60.0160.00216.87
8.0.50.0110.00516.77
8.0.30.0140.00816.92
8.0.20.0150.00717.20
8.0.10.0140.00416.80
8.0.00.0110.01116.76
7.4.330.0110.00215.91
7.4.320.0160.00216.62
7.4.300.0080.00816.64
7.4.290.0140.00316.72
7.4.280.0130.00316.63
7.4.270.0150.00216.67
7.4.260.0130.00416.65
7.4.250.0130.00316.65
7.4.240.0080.00616.61
7.4.230.0090.00816.68
7.4.220.0180.00616.75
7.4.210.0160.00716.73
7.4.200.0130.00416.55
7.4.190.0120.00416.70
7.4.180.0250.00016.80
7.4.160.0190.00716.61
7.4.150.0160.00617.10
7.4.140.0120.00817.50
7.4.130.0150.00516.63
7.4.120.0130.00816.70
7.4.110.0160.00616.68
7.4.100.0130.01016.69
7.4.90.0130.00816.58
7.4.80.0130.01216.60
7.4.70.0140.00616.60
7.4.60.0170.00316.63
7.4.50.0110.00316.72
7.4.40.0140.00616.69
7.4.30.0150.00616.62
7.4.20.0140.01216.67
7.4.10.0200.00416.55
7.4.00.0110.00815.69
7.3.330.0110.00414.93
7.3.320.0090.00714.98
7.3.310.0110.00716.63
7.3.300.0100.00716.56
7.3.290.0100.00716.42
7.3.280.0130.00516.42
7.3.270.0190.00317.10
7.3.260.0150.00616.56
7.3.250.0170.00516.59
7.3.240.0160.00516.71
7.3.230.0160.00616.68
7.3.220.0210.00316.80
7.3.210.0120.01216.55
7.3.200.0180.00316.56
7.3.190.0170.00516.57
7.3.180.0180.00516.50
7.3.170.0170.00716.62
7.3.160.0160.00516.48
7.3.150.0120.00916.63
7.3.140.0140.00816.65
7.3.130.0120.00816.60
7.3.120.0080.01215.78
7.3.110.0110.00916.05
7.3.100.0130.00715.99
7.3.90.0100.00815.95
7.3.80.0120.00716.03
7.3.70.0110.00616.04
7.3.60.0100.00816.03
7.3.50.0120.00516.01
7.3.40.0110.00715.95
7.3.30.0090.00916.05
7.3.20.0140.00616.90
7.3.10.0090.01116.71
7.3.00.0110.00616.82
7.2.340.0240.00316.80
7.2.330.0170.00516.69
7.2.320.0190.00516.72
7.2.310.0200.00416.62
7.2.300.0150.01016.62
7.2.290.0160.00516.63
7.2.280.0100.01116.73
7.2.270.0170.00516.63
7.2.260.0130.00916.68
7.2.250.0120.00715.93
7.2.240.0130.00616.09
7.2.230.0110.00716.17
7.2.220.0100.00916.09
7.2.210.0120.00616.23
7.2.200.0130.00516.09
7.2.190.0100.00916.21
7.2.180.0110.00716.09
7.2.170.0100.00616.12
7.2.160.0130.00816.63
7.2.150.0160.00717.18
7.2.140.0160.00817.33
7.2.130.0140.01017.14
7.2.120.0150.00617.05
7.2.110.0160.00617.08
7.2.100.0140.00717.22
7.2.90.0150.00717.11
7.2.80.0190.00916.52
7.2.70.0170.00716.70
7.2.60.0200.00616.68
7.2.50.0190.00716.63
7.2.40.0220.00416.67
7.2.30.0230.00816.61
7.2.20.0160.00816.59
7.2.10.0280.00616.62
7.2.00.0150.00717.22
7.1.330.0160.00716.11
7.1.320.0160.00416.19
7.1.310.0170.00416.04
7.1.300.0090.01216.14
7.1.290.0140.00816.04
7.1.280.0130.00816.06
7.1.270.0140.00716.06
7.1.260.0150.00516.02
7.1.250.0120.01116.04
7.1.240.0140.00916.19
7.1.230.0220.00316.20
7.1.220.0180.00716.19
7.1.210.0170.00916.37
7.1.200.0170.00416.21
7.1.190.0220.00915.58
7.1.180.0210.00815.50
7.1.170.0210.00915.48
7.1.160.0240.00815.46
7.1.150.0220.00715.38
7.1.140.0250.00415.55
7.1.130.0280.00615.36
7.1.120.0290.00715.53
7.1.110.0250.01215.44
7.1.100.0170.00916.16
7.1.90.0350.01215.49
7.1.80.0190.01115.51
7.1.70.0200.00615.83
7.1.60.0210.01020.31
7.1.50.0250.00720.33
7.1.40.0220.00620.22
7.1.30.0230.00720.14
7.1.20.0620.01020.25
7.1.10.0170.00715.65
7.1.00.0190.00415.85
7.0.330.0150.00716.04
7.0.320.0180.00515.98
7.0.310.0240.00515.09
7.0.300.0440.00915.21
7.0.290.0280.00815.15
7.0.280.0170.00615.94
7.0.270.0250.00615.13
7.0.260.0240.00915.09
7.0.250.0310.00615.24
7.0.240.0240.00715.24
7.0.230.0260.00915.10
7.0.220.0290.00815.21
7.0.210.0230.00515.18
7.0.200.0190.00715.61
7.0.190.0200.00715.62
7.0.180.0180.00615.47
7.0.170.0200.00715.48
7.0.160.0290.00515.50
7.0.150.0210.00615.39
7.0.140.0200.00515.47
7.0.130.0180.00615.55
7.0.120.0190.00515.50
7.0.110.0160.00815.57
7.0.100.0220.00615.45
7.0.90.0200.00715.41
7.0.80.0190.00815.44
7.0.70.0210.00815.43
7.0.60.0180.01015.40
7.0.50.0160.00715.44
7.0.40.0170.01115.11
7.0.30.0160.00715.03
7.0.20.0220.00515.08
7.0.10.0180.01015.03
7.0.00.0200.00615.00
5.6.400.0120.01016.50
5.6.390.0160.00716.51
5.6.380.0210.00316.39
5.6.370.0170.00516.30
5.6.360.0190.00616.54
5.6.350.0140.00916.35
5.6.340.0220.00516.39
5.6.330.0160.00916.39
5.6.320.0180.00616.41
5.6.310.0180.00716.36
5.6.300.0150.01417.08
5.6.290.0120.01717.00
5.6.280.0090.02617.07
5.6.270.0140.02617.08
5.6.260.0150.01616.95
5.6.250.0150.01916.96
5.6.240.0130.01516.95
5.6.230.0160.01416.97
5.6.220.0160.02016.97
5.6.210.0170.02017.04
5.6.200.0150.01717.00
5.6.190.0100.02017.05
5.6.180.0140.01716.98
5.6.170.0110.02016.94
5.6.160.0130.01816.99
5.6.150.0110.02016.96
5.6.140.0110.02416.98
5.6.130.0100.01817.05
5.6.120.0160.02316.86
5.6.110.0150.02016.91
5.6.100.0110.02017.02
5.6.90.0120.02516.86
5.6.80.0130.02216.80
5.6.70.0110.01616.70
5.6.60.0120.01916.77
5.6.50.0180.02116.74
5.6.40.0120.01516.62
5.6.30.0120.02416.72
5.6.20.0130.02016.78
5.6.10.0150.02416.77
5.6.00.0160.02016.75
5.5.380.0170.01415.36
5.5.370.0160.01315.42
5.5.360.0150.02215.27
5.5.350.0160.02315.34
5.5.340.0100.02515.53
5.5.330.0060.01915.39
5.5.320.0100.01915.46
5.5.310.0090.02115.39
5.5.300.0110.02715.28
5.5.290.0130.02315.47
5.5.280.0130.01715.31
5.5.270.0100.02015.33
5.5.260.0110.02615.37
5.5.250.0100.01615.33
5.5.240.0160.02115.09
5.5.230.0110.02715.17
5.5.220.0130.01515.26
5.5.210.0110.01815.22
5.5.200.0120.01415.32
5.5.190.0130.01615.27
5.5.180.0090.02215.27
5.5.170.0170.00916.37
5.5.160.0100.01715.25
5.5.150.0110.02415.26
5.5.140.0140.02115.29
5.5.130.0080.02815.14
5.5.120.0130.01315.20
5.5.110.0130.01315.19
5.5.100.0130.01415.30
5.5.90.0130.01315.18
5.5.80.0080.01715.23
5.5.70.0080.01815.18
5.5.60.0120.01515.30
5.5.50.0130.01315.24
5.5.40.0120.01415.14
5.5.30.0120.02215.16
5.5.20.0120.02215.27
5.5.10.0130.01515.27
5.5.00.0120.01415.24
5.4.450.0120.02214.96
5.4.440.0100.01714.92
5.4.430.0090.02414.95
5.4.420.0110.01414.88
5.4.410.0100.01715.01
5.4.400.0090.02014.85
5.4.390.0130.01414.76
5.4.380.0130.01514.88
5.4.370.0130.01614.88
5.4.360.0110.02514.84
5.4.350.0120.01314.88
5.4.340.0120.01714.80
5.4.330.0140.00514.67
5.4.320.0100.02214.77
5.4.310.0130.01414.91
5.4.300.0110.02214.96
5.4.290.0080.01814.91
5.4.280.0070.02314.83
5.4.270.0090.01514.90
5.4.260.0110.01414.80
5.4.250.0140.01314.79
5.4.240.0160.01314.88
5.4.230.0110.01614.86
5.4.220.0100.01514.84
5.4.210.0100.01714.89
5.4.200.0070.01614.86
5.4.190.0070.01914.83
5.4.180.0130.01214.76
5.4.170.0090.01514.91
5.4.160.0120.01214.73
5.4.150.0090.01514.93
5.4.140.0100.01314.29
5.4.130.0090.01314.24
5.4.120.0090.02014.20
5.4.110.0120.01714.15
5.4.100.0110.01714.28
5.4.90.0090.02214.21
5.4.80.0120.01314.19
5.4.70.0110.01514.23
5.4.60.0130.01514.30
5.4.50.0120.01114.28
5.4.40.0090.01614.19
5.4.30.0110.01814.28
5.4.20.0110.01814.22
5.4.10.0110.02314.22
5.4.00.0130.01014.11
5.3.290.0110.02213.77
5.3.280.0090.01413.77
5.3.270.0100.01313.80
5.3.260.0120.01113.78
5.3.250.0120.01113.82
5.3.240.0090.01413.76
5.3.230.0080.01713.71
5.3.220.0130.01113.68
5.3.210.0110.02013.72
5.3.200.0090.02113.75
5.3.190.0100.02413.77
5.3.180.0130.01913.87
5.3.170.0090.01813.79
5.3.160.0100.02013.79
5.3.150.0120.01913.82
5.3.140.0130.01213.72
5.3.130.0110.01313.70
5.3.120.0090.02213.77
5.3.110.0130.01613.69
5.3.100.0090.02213.74
5.3.90.0100.02113.83
5.3.80.0110.01313.70
5.3.70.0110.01413.71
5.3.60.0050.02013.72
5.3.50.0120.01413.72
5.3.40.0120.01413.79
5.3.30.0100.01413.73
5.3.20.0130.01213.67
5.3.10.0120.01313.64
5.3.00.0110.01313.56

preferences:
31.74 ms | 403 KiB | 5 Q