3v4l.org

run code in 300+ PHP versions simultaneously
<?php $products = [1, 2, 3, 4, 5]; $vendors = ["Amazon", "Newegg", "Frys"]; function pc_permute($items, $perms = array()) { if (empty($items)) { //echo join(' ', $perms) . "</br>"; return $perms; } else { for ($i = count($items) - 1; $i >= 0; --$i) { $newitems = $items; $newperms = $perms; list($foo) = array_splice($newitems, $i, 1); array_unshift($newperms, $foo); pc_permute($newitems, $newperms); } } } var_dump(pc_permute($products));

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.40.0110.01118.71
8.3.30.0070.00720.20
8.3.20.0080.00020.34
8.3.10.0080.00022.15
8.3.00.0040.00422.45
8.2.170.0160.00322.96
8.2.160.0040.01122.26
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0070.01126.16
8.2.120.0040.00421.03
8.2.110.0000.00922.28
8.2.100.0070.00417.91
8.2.90.0030.00519.17
8.2.80.0050.00319.16
8.2.70.0080.00017.63
8.2.60.0050.00317.93
8.2.50.0030.00718.07
8.2.40.0060.00318.06
8.2.30.0070.00018.21
8.2.20.0000.00717.82
8.2.10.0000.00717.65
8.2.00.0030.00617.72
8.1.270.0000.00823.99
8.1.260.0080.00028.09
8.1.250.0080.00028.09
8.1.240.0030.00623.88
8.1.230.0070.00419.01
8.1.220.0040.00417.77
8.1.210.0030.00518.77
8.1.200.0030.00617.36
8.1.190.0000.00817.53
8.1.180.0110.00018.10
8.1.170.0100.00018.63
8.1.160.0040.00418.89
8.1.150.0000.00718.55
8.1.140.0030.00617.36
8.1.130.0030.00317.89
8.1.120.0050.00217.50
8.1.110.0040.00417.41
8.1.100.0030.00517.45
8.1.90.0030.00517.45
8.1.80.0000.00717.48
8.1.70.0070.00017.32
8.1.60.0040.00417.48
8.1.50.0000.00717.48
8.1.40.0040.00417.53
8.1.30.0000.00817.52
8.1.20.0000.00817.54
8.1.10.0000.00717.46
8.1.00.0000.00817.56
8.0.300.0040.00418.77
8.0.290.0000.00717.16
8.0.280.0070.00018.30
8.0.270.0070.00017.11
8.0.260.0000.00718.42
8.0.250.0070.00016.80
8.0.240.0050.00316.88
8.0.230.0030.00516.85
8.0.220.0040.00416.87
8.0.210.0040.00416.73
8.0.200.0030.00616.88
8.0.190.0080.00016.89
8.0.180.0000.00816.86
8.0.170.0000.00816.83
8.0.160.0000.00716.79
8.0.150.0000.00716.79
8.0.140.0080.00016.86
8.0.130.0000.00613.29
8.0.120.0050.00316.88
8.0.110.0040.00416.84
8.0.100.0070.00016.77
8.0.90.0050.00316.91
8.0.80.0130.00316.80
8.0.70.0050.00216.75
8.0.60.0030.00516.92
8.0.50.0050.00216.72
8.0.30.0100.00816.99
8.0.20.0130.01017.40
8.0.10.0040.00417.03
8.0.00.0090.00916.73
7.4.330.0040.00415.00
7.4.320.0070.00016.57
7.4.300.0030.00316.57
7.4.290.0050.00516.61
7.4.280.0030.00316.42
7.4.270.0000.00816.50
7.4.260.0050.00013.27
7.4.250.0070.00016.61
7.4.240.0030.00416.55
7.4.230.0000.00716.59
7.4.220.0160.00616.51
7.4.210.0080.00716.54
7.4.200.0040.00416.70
7.4.190.0030.00316.46
7.4.160.0090.00616.25
7.4.150.0130.00717.40
7.4.140.0120.01417.86
7.4.130.0110.00916.44
7.4.120.0050.01316.59
7.4.110.0100.00616.56
7.4.100.0140.00316.50
7.4.90.0100.01016.45
7.4.80.0160.00419.39
7.4.70.0100.00716.58
7.4.60.0130.00316.61
7.4.50.0000.00816.32
7.4.40.0040.01222.77
7.4.30.0110.00716.66
7.4.10.0060.01215.00
7.4.00.0030.01315.00
7.3.330.0000.00513.41
7.3.320.0050.00013.17
7.3.310.0030.00316.35
7.3.300.0000.00716.23
7.3.290.0030.01316.35
7.3.280.0100.00716.34
7.3.270.0150.00317.40
7.3.260.0080.00816.47
7.3.250.0110.01016.66
7.3.240.0070.01016.36
7.3.230.0150.00316.39
7.3.210.0070.01016.32
7.3.200.0030.01319.39
7.3.190.0110.00716.63
7.3.180.0030.01316.23
7.3.170.0070.01016.47
7.3.160.0000.01616.44
7.3.130.0120.00614.58
7.3.120.0050.01314.75
7.3.110.0100.00914.92
7.3.100.0070.00914.72
7.3.90.0090.00814.82
7.3.80.0070.00614.88
7.3.70.0080.00514.88
7.3.60.0080.00714.82
7.3.50.0020.01314.84
7.3.40.0070.00714.69
7.3.30.0030.01214.65
7.3.20.0070.00716.75
7.3.10.0060.00816.70
7.3.00.0040.00816.74
7.2.330.0120.00616.80
7.2.320.0070.01116.45
7.2.310.0040.01416.58
7.2.300.0150.00416.77
7.2.290.0090.00616.54
7.2.260.0100.01014.97
7.2.250.0070.01015.18
7.2.240.0130.00414.89
7.2.230.0080.01014.99
7.2.220.0100.00715.27
7.2.210.0060.00815.12
7.2.200.0100.00515.04
7.2.190.0050.00915.17
7.2.180.0050.01214.99
7.2.170.0100.00615.15
7.2.160.0090.00615.22
7.2.150.0090.00616.97
7.2.140.0030.00916.82
7.2.130.0060.00916.90
7.2.120.0070.00716.87
7.2.110.0070.00516.88
7.2.100.0050.00616.88
7.2.90.0050.01016.92
7.2.80.0050.00816.84
7.2.70.0070.00616.89
7.2.60.0050.00916.95
7.2.50.0050.01016.93
7.2.40.0060.00616.96
7.2.30.0010.01416.99
7.2.20.0060.00616.91
7.2.10.0080.00616.87
7.2.00.0080.00517.06
7.1.330.0070.00715.92
7.1.320.0040.01315.73
7.1.310.0080.00815.69
7.1.300.0030.00915.75
7.1.290.0090.00515.93
7.1.280.0070.00915.58
7.1.270.0060.00715.88
7.1.260.0030.01015.74
7.1.250.0020.01015.85
7.1.240.0070.01115.86
7.1.230.0070.01015.61
7.1.220.0000.01115.75
7.1.210.0030.01015.89
7.1.200.0080.00715.68
7.1.190.0060.00915.69
7.1.180.0030.00615.52
7.1.170.0030.01015.79
7.1.160.0030.00615.91
7.1.150.0060.00315.94
7.1.140.0040.00715.54
7.1.130.0110.00315.77
7.1.120.0040.00815.82
7.1.110.0040.00815.90
7.1.100.0090.00615.61
7.1.90.0000.01315.75
7.1.80.0040.01115.97
7.1.70.0070.00416.57
7.1.60.0090.00917.55
7.1.50.0080.00816.45
7.1.40.0040.01215.98
7.1.30.0040.01115.95
7.1.20.0040.01115.78
7.1.10.0040.00815.86
7.1.00.0030.03118.95
7.0.330.0030.01015.34
7.0.320.0140.00015.34
7.0.310.0120.00315.40
7.0.300.0120.00015.46
7.0.290.0030.01015.45
7.0.280.0090.00015.50
7.0.270.0040.00415.44
7.0.260.0030.01315.33
7.0.250.0000.01515.54
7.0.240.0060.00915.45
7.0.230.0060.00315.60
7.0.220.0070.01015.54
7.0.210.0100.00715.56
7.0.200.0050.00916.18
7.0.190.0040.01115.37
7.0.180.0110.00415.63
7.0.170.0030.01315.47
7.0.160.0000.01215.50
7.0.150.0030.00615.41
7.0.140.0070.03818.83
7.0.130.0040.00415.36
7.0.120.0000.01315.59
7.0.110.0070.00415.58
7.0.100.0110.04017.68
7.0.90.0070.04017.62
7.0.80.0100.04317.78
7.0.70.0030.04617.70
7.0.60.0120.04217.80
7.0.50.0130.03317.95
7.0.40.0070.04416.89
7.0.30.0080.04316.75
7.0.20.0070.03016.86
7.0.10.0050.03016.80
7.0.00.0050.04516.82
5.6.400.0110.00314.27
5.6.390.0130.00314.60
5.6.380.0070.00714.34
5.6.370.0040.01414.04
5.6.360.0080.00014.40
5.6.350.0090.00314.30
5.6.340.0060.00314.33
5.6.330.0160.00014.19
5.6.320.0100.00714.62
5.6.310.0120.00314.25
5.6.300.0070.00814.54
5.6.290.0040.01114.35
5.6.280.0050.04217.58
5.6.270.0070.00314.57
5.6.260.0060.00914.46
5.6.250.0080.04317.61
5.6.240.0080.02717.52
5.6.230.0050.05017.52
5.6.220.0060.03317.54
5.6.210.0110.04017.48
5.6.200.0080.04017.71
5.6.190.0060.05017.81
5.6.180.0040.02717.76
5.6.170.0050.04417.53
5.6.160.0110.03017.78
5.6.150.0070.04717.70
5.6.140.0120.03717.73
5.6.130.0070.04417.73
5.6.120.0140.03717.63
5.6.110.0130.04317.71
5.6.100.0110.02617.65
5.6.90.0070.04817.72
5.6.80.0050.04017.35
5.6.70.0140.03617.25
5.6.60.0070.04317.43
5.6.50.0050.03617.42
5.6.40.0100.03317.24
5.6.30.0090.03517.30
5.6.20.0050.03217.26
5.6.10.0100.03817.36
5.6.00.0080.04517.31
5.5.380.0090.04417.35
5.5.370.0190.02417.26
5.5.360.0060.04817.40
5.5.350.0070.04317.37
5.5.340.0090.04217.40
5.5.330.0090.04317.49
5.5.320.0050.04817.46
5.5.310.0050.04717.45
5.5.300.0070.03317.56
5.5.290.0050.04517.48
5.5.280.0030.05217.28
5.5.270.0030.05317.57
5.5.260.0070.04417.62
5.5.250.0110.04017.56
5.5.240.0030.04817.15
5.5.230.0110.04117.12
5.5.220.0080.04517.10
5.5.210.0090.02617.15
5.5.200.0050.04817.08
5.5.190.0070.04017.14
5.5.180.0080.04017.37
5.5.170.0060.00914.09
5.5.160.0050.04717.18
5.5.150.0060.04117.21
5.5.140.0060.04217.03
5.5.130.0090.04317.22
5.5.120.0080.04516.94
5.5.110.0070.04517.10
5.5.100.0050.02916.92
5.5.90.0120.03917.08
5.5.80.0100.02517.24
5.5.70.0070.04217.06
5.5.60.0050.03217.24
5.5.50.0110.04017.32
5.5.40.0050.03517.13
5.5.30.0050.02617.04
5.5.20.0030.04817.09
5.5.10.0030.05117.08
5.5.00.0070.04016.98
5.4.450.0050.03215.52
5.4.440.0030.03315.34
5.4.430.0080.04315.43
5.4.420.0100.03915.36
5.4.410.0070.04215.39
5.4.400.0110.03515.23
5.4.390.0020.03715.27
5.4.380.0070.03815.27
5.4.370.0030.04515.20
5.4.360.0070.04015.30
5.4.350.0120.02615.26
5.4.340.0060.04515.19
5.4.330.0040.01211.50
5.4.320.0080.03715.27
5.4.310.0050.03015.32
5.4.300.0080.03515.33
5.4.290.0030.04215.35
5.4.280.0050.02815.33
5.4.270.0030.04515.20
5.4.260.0050.03715.33
5.4.250.0030.04415.27
5.4.240.0050.04315.20
5.4.230.0090.02515.27
5.4.220.0110.03815.22
5.4.210.0070.04315.29
5.4.200.0100.03715.31
5.4.190.0170.03015.20
5.4.180.0040.04315.31
5.4.170.0100.04115.27
5.4.160.0060.04015.35
5.4.150.0070.04015.19
5.4.140.0060.03613.88
5.4.130.0070.03814.00
5.4.120.0130.03513.98
5.4.110.0050.03713.96
5.4.100.0020.04413.97
5.4.90.0100.03514.00
5.4.80.0120.03713.98
5.4.70.0080.02213.92
5.4.60.0050.03313.96
5.4.50.0100.03713.99
5.4.40.0080.04014.02
5.4.30.0070.03913.91
5.4.20.0060.03814.00
5.4.10.0080.03013.90
5.4.00.0060.04013.57
5.3.290.0050.04113.05
5.3.280.0040.03613.02
5.3.270.0030.04413.05
5.3.260.0070.03813.03
5.3.250.0050.04013.03
5.3.240.0030.04113.02
5.3.230.0070.04013.05
5.3.220.0100.03713.02
5.3.210.0080.03713.01
5.3.200.0030.03812.94
5.3.190.0030.03612.96
5.3.180.0020.04312.96
5.3.170.0070.04213.03
5.3.160.0040.03213.04
5.3.150.0050.03713.03
5.3.140.0040.02612.94
5.3.130.0080.03112.96
5.3.120.0040.02513.02
5.3.110.0070.04112.98
5.3.100.0050.02612.77
5.3.90.0050.04212.76
5.3.80.0030.03812.74
5.3.70.0020.04112.73
5.3.60.0050.04012.68
5.3.50.0130.03512.72
5.3.40.0050.03912.69
5.3.30.0040.04212.63
5.3.20.0050.03512.48
5.3.10.0030.03512.58
5.3.00.0070.03112.50
5.2.170.0030.05711.62
5.2.160.0070.06011.62
5.2.150.0030.06011.62
5.2.140.0070.06311.62
5.2.130.0100.05711.62
5.2.120.0070.03011.62
5.2.110.0070.04711.62
5.2.100.0030.06011.62
5.2.90.0070.06011.62
5.2.80.0100.05311.62
5.2.70.0170.05311.62
5.2.60.0000.06711.62
5.2.50.0030.06711.62
5.2.40.0070.03011.62
5.2.30.0000.07011.62
5.2.20.0100.05311.62
5.2.10.0000.04311.62
5.2.00.0030.04011.62
5.1.60.0030.05311.62
5.1.50.0030.04311.62
5.1.40.0070.05011.62
5.1.30.0000.05711.62
5.1.20.0070.05311.62
5.1.10.0000.05311.62
5.1.00.0070.04311.62
5.0.50.0000.05011.62
5.0.40.0000.05011.62
5.0.30.0030.04311.62
5.0.20.0030.04011.62
5.0.10.0030.03311.62
5.0.00.0070.06311.62
4.4.90.0030.03711.62
4.4.80.0000.04011.62
4.4.70.0070.03311.62
4.4.60.0030.03711.62
4.4.50.0030.03011.62
4.4.40.0000.05311.62
4.4.30.0000.02011.62
4.4.20.0070.03311.62
4.4.10.0030.03711.62
4.4.00.0000.03011.62
4.3.110.0070.02711.62
4.3.100.0030.03311.62
4.3.90.0030.03011.62
4.3.80.0000.05711.62
4.3.70.0000.03311.62
4.3.60.0030.03011.62
4.3.50.0070.03011.62
4.3.40.0000.05711.62
4.3.30.0070.03011.62
4.3.20.0030.03311.62
4.3.10.0000.03011.62
4.3.00.0070.03011.62

preferences:
56.38 ms | 400 KiB | 5 Q