3v4l.org

run code in 300+ PHP versions simultaneously
<?php $category_input = array( 'cat_20', 'post-in-cat-20', 'post-in-cat-20', 'post-in-cat-20', 'cat_19', 'post-in-cat-19', 'post-in-cat-19', 'post-in-cat-19', 'post-in-cat-19', 'cat_2', 'post-in-cat-2', 'post-in-cat-2', 'post-in-cat-2' ); $out_arr = array(); foreach($category_input as $val){ $part = explode('_', $val); if(isset($part[0]) && $part[0] == 'cat'){ $out_arr[$val] = array(); $key = $val; }else{ $out_arr[$key][] = $val; } } print_r($out_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.5.30.0020.00619.47
8.5.20.0090.00820.05
8.5.10.0120.00716.58
8.5.00.0080.01220.02
8.4.180.0050.00522.06
8.4.170.0140.00923.88
8.4.160.0140.00823.99
8.4.150.0060.00616.89
8.4.140.0130.00817.62
8.4.130.0090.00717.72
8.4.120.0040.00522.53
8.4.110.0110.00922.22
8.4.100.0110.01017.41
8.4.90.0110.00918.46
8.4.80.0120.00818.00
8.4.70.0090.01117.72
8.4.60.0130.00818.73
8.4.50.0090.01317.49
8.4.40.0100.00719.37
8.4.30.0170.00319.71
8.4.20.0090.00617.82
8.4.10.0100.00619.54
8.3.300.0130.00820.20
8.3.290.0130.00720.73
8.3.280.0110.00818.47
8.3.270.0110.00916.68
8.3.260.0110.00916.62
8.3.250.0130.00618.75
8.3.240.0130.00616.75
8.3.230.0150.00416.57
8.3.220.0100.01017.10
8.3.210.0080.01218.47
8.3.200.0080.00316.80
8.3.190.0110.00816.52
8.3.180.0120.00616.73
8.3.170.0040.00419.22
8.3.160.0150.00318.30
8.3.150.0000.01420.80
8.3.140.0040.00416.56
8.3.130.0060.00318.28
8.3.120.0100.01020.60
8.3.110.0000.00816.79
8.3.100.0150.00318.34
8.3.90.0080.00026.77
8.3.80.0060.00316.63
8.3.70.0090.00616.58
8.3.60.0070.00718.31
8.3.50.0110.00916.45
8.3.40.0070.00718.75
8.3.30.0030.01018.80
8.3.20.0070.00020.28
8.3.10.0080.00023.51
8.3.00.0000.00820.84
8.2.300.0110.01018.75
8.2.290.0120.00720.34
8.2.280.0110.00718.26
8.2.270.0060.01316.96
8.2.260.0180.00020.23
8.2.250.0040.00416.50
8.2.240.0100.01017.17
8.2.230.0060.00320.94
8.2.220.0050.00537.54
8.2.210.0000.01026.77
8.2.200.0090.00016.75
8.2.190.0130.01018.16
8.2.180.0100.01016.63
8.2.170.0140.00719.02
8.2.160.0080.00622.25
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0060.00921.00
8.2.110.0060.00322.20
8.2.100.0030.00917.72
8.2.90.0080.00017.63
8.2.80.0100.00018.77
8.2.70.0000.00817.63
8.2.60.0050.00317.50
8.2.50.0080.00317.63
8.2.40.0000.00819.89
8.2.30.0050.00220.42
8.2.20.0040.00418.18
8.2.10.0080.00018.12
8.2.00.0000.00818.12
8.1.340.0140.00819.90
8.1.330.0100.00823.63
8.1.320.0110.00916.16
8.1.310.0120.00616.75
8.1.300.0090.00917.47
8.1.290.0030.00618.88
8.1.280.0080.00825.92
8.1.270.0000.00823.99
8.1.260.0000.00826.35
8.1.250.0100.00728.09
8.1.240.0110.00719.27
8.1.230.0040.00822.53
8.1.220.0080.00018.53
8.1.210.0070.00019.18
8.1.200.0000.00817.35
8.1.190.0030.00617.23
8.1.180.0080.00018.10
8.1.170.0040.00417.62
8.1.160.0060.00318.88
8.1.150.0040.00420.18
8.1.140.0030.00619.47
8.1.130.0030.00318.92
8.1.120.0020.00917.33
8.1.110.0090.00017.39
8.1.100.0050.00317.35
8.1.90.0060.00317.51
8.1.80.0060.00317.46
8.1.70.0050.00317.46
8.1.60.0050.00217.60
8.1.50.0040.00417.57
8.1.40.0030.00517.54
8.1.30.0030.00717.68
8.1.20.0030.00517.69
8.1.10.0080.00017.53
8.1.00.0040.00417.34
8.0.300.0030.00319.88
8.0.290.0050.00316.61
8.0.280.0040.00418.50
8.0.270.0050.00316.70
8.0.260.0030.00316.93
8.0.250.0030.00516.92
8.0.240.0070.00016.91
8.0.230.0070.00016.82
8.0.220.0040.00416.76
8.0.210.0030.00316.90
8.0.200.0130.00517.00
8.0.190.0000.00816.94
8.0.180.0020.00516.88
8.0.170.0000.00716.93
8.0.160.0040.00416.88
8.0.150.0030.00316.82
8.0.140.0040.00416.79
8.0.130.0050.00013.29
8.0.120.0000.00716.84
8.0.110.0050.00316.82
8.0.100.0030.00516.74
8.0.90.0000.00716.80
8.0.80.0070.01016.95
8.0.70.0030.00517.00
8.0.60.0050.00216.75
8.0.50.0040.00416.86
8.0.30.0100.01217.03
8.0.20.0100.01117.40
8.0.10.0040.00416.85
8.0.00.0160.00916.55
7.4.330.0000.00415.55
7.4.320.0030.00316.61
7.4.300.0030.00316.45
7.4.290.0070.00016.58
7.4.280.0020.00516.50
7.4.270.0000.00716.48
7.4.260.0050.00013.25
7.4.250.0000.00716.52
7.4.240.0040.00416.49
7.4.230.0000.00716.41
7.4.220.0130.00316.64
7.4.210.0000.01416.61
7.4.200.0000.00716.39
7.4.160.0080.00816.61
7.4.150.0070.01417.40
7.4.140.0100.01017.86
7.4.130.0130.01316.50
7.4.120.0140.00516.50
7.4.110.0120.00616.56
7.4.100.0090.00916.48
7.4.90.0100.00716.57
7.4.80.0100.00919.39
7.4.70.0070.01016.63
7.4.60.0160.00016.41
7.4.50.0070.00716.50
7.4.40.0110.00616.47
7.4.30.0090.00916.36
7.4.10.0070.01114.92
7.4.00.0050.01215.02
7.3.330.0060.00013.16
7.3.320.0000.00513.30
7.3.310.0030.00316.36
7.3.300.0040.00416.21
7.3.290.0070.00716.43
7.3.280.0060.01016.32
7.3.270.0140.01017.40
7.3.260.0040.01216.50
7.3.250.0090.01016.50
7.3.240.0100.01116.43
7.3.230.0120.00616.52
7.3.210.0100.00616.64
7.3.200.0200.00016.36
7.3.190.0090.00616.28
7.3.180.0060.01516.29
7.3.170.0130.00316.32
7.3.160.0120.00416.18
7.3.130.0200.00014.64
7.3.120.0090.00614.74
7.3.110.0090.00614.71
7.3.100.0120.00514.88
7.3.90.0090.00514.95
7.3.80.0050.00714.75
7.3.70.0040.00914.80
7.3.60.0050.01014.86
7.3.50.0070.00714.71
7.3.40.0090.00514.83
7.3.30.0060.00514.65
7.3.20.0060.00716.68
7.3.10.0030.00916.79
7.3.00.0020.01216.63
7.2.330.0120.00916.75
7.2.320.0090.00816.75
7.2.310.0150.00416.67
7.2.300.0040.01216.75
7.2.290.0100.01116.57
7.2.260.0040.01514.81
7.2.250.0070.00915.17
7.2.240.0060.00714.99
7.2.230.0050.01015.26
7.2.220.0070.00414.91
7.2.210.0080.00615.25
7.2.200.0060.01115.07
7.2.190.0050.01215.05
7.2.180.0060.00515.05
7.2.170.0070.00715.03
7.2.160.0040.01115.00
7.2.150.0060.00916.92
7.2.140.0090.00616.96
7.2.130.0000.01317.03
7.2.120.0030.00916.85
7.2.110.0110.00417.04
7.2.100.0120.00017.07
7.2.90.0120.00316.86
7.2.80.0100.00316.85
7.2.70.0070.01116.81
7.2.60.0030.00716.90
7.2.50.0080.00616.99
7.2.40.0100.00317.21
7.2.30.0090.00616.76
7.2.20.0070.00417.00
7.2.10.0040.01416.79
7.2.00.0130.00717.03
7.1.330.0030.01115.79
7.1.320.0030.01315.75
7.1.310.0060.00715.83
7.1.300.0050.00615.81
7.1.290.0060.00815.76
7.1.280.0020.01015.79
7.1.270.0080.00415.64
7.1.260.0080.00615.83
7.1.250.0060.00915.65
7.1.240.0060.00616.02
7.1.230.0040.00415.98
7.1.220.0030.00615.82
7.1.210.0090.00615.53
7.1.200.0030.00915.73
7.1.190.0080.00415.79
7.1.180.0040.00815.85
7.1.170.0000.01015.62
7.1.160.0060.00615.82
7.1.150.0090.00015.83
7.1.140.0140.00015.83
7.1.130.0040.00715.48
7.1.120.0090.00915.71
7.1.110.0040.00815.91
7.1.100.0030.01015.96
7.1.90.0060.00815.90
7.1.80.0030.00815.77
7.1.70.0050.01116.46
7.1.60.0260.00824.61
7.1.50.0250.01124.35
7.1.40.0230.01024.28
7.1.30.0230.00824.16
7.1.20.0280.01024.17
7.1.10.0260.01115.31
7.1.00.0170.01015.44
7.0.330.0070.00315.46
7.0.320.0050.00315.33
7.0.310.0030.01415.58
7.0.300.0100.00315.02
7.0.290.0050.00315.39
7.0.280.0090.00615.29
7.0.270.0070.01115.06
7.0.260.0100.00615.11
7.0.250.0070.00415.64
7.0.240.0030.01015.30
7.0.230.0030.01315.42
7.0.220.0040.00815.56
7.0.210.0060.00615.29
7.0.200.0210.01015.16
7.0.190.0190.00715.15
7.0.180.0160.00914.93
7.0.170.0180.01214.93
7.0.160.0280.00814.97
7.0.150.0180.00615.01
7.0.140.0200.00814.88
7.0.130.0180.00815.07
7.0.120.0270.00714.90
7.0.110.0210.00514.92
7.0.100.0250.01114.85
7.0.90.0200.00514.99
7.0.80.0180.00614.79
7.0.70.0170.00814.81
7.0.60.0210.00814.77
7.0.50.0180.00715.04
7.0.40.0280.01014.02
7.0.30.0230.00813.92
7.0.20.0230.00613.91
7.0.10.0190.00514.00
7.0.00.0180.00713.99
5.6.400.0060.00614.74
5.6.390.0080.00414.29
5.6.380.0060.00614.57
5.6.370.0030.01314.65
5.6.360.0070.00314.11
5.6.350.0030.01014.46
5.6.340.0090.00314.79
5.6.330.0040.01414.65
5.6.320.0090.00614.70
5.6.310.0070.00714.44
5.6.300.0030.00614.44
5.6.290.0080.00414.26
5.6.280.0130.00314.22
5.6.270.0060.00614.58
5.6.260.0080.00614.66
5.6.250.0080.00314.30
5.6.240.0060.00914.50
5.6.230.0100.00714.38
5.6.220.0100.00314.36
5.6.210.0030.00914.23
5.6.200.0060.00614.31
5.6.190.0090.00614.47
5.6.180.0100.00714.43
5.6.170.0040.01214.40
5.6.160.0110.00014.50
5.6.150.0070.00714.54
5.6.140.0030.00914.38
5.6.130.0030.00614.42
5.6.120.0080.00514.58
5.6.110.0060.00614.53
5.6.100.0000.01414.39
5.6.90.0070.00314.35
5.6.80.0130.00314.44
5.6.70.0060.01014.55
5.6.60.0030.01014.30
5.6.50.0030.00614.14
5.6.40.0060.00914.61
5.6.30.0070.00714.47
5.6.20.0120.00614.20
5.6.10.0030.01014.36
5.6.00.0060.00614.37

preferences:
55.35 ms | 2106 KiB | 5 Q