3v4l.org

run code in 300+ PHP versions simultaneously
<?php function pc_permute($items, $perms = array()) { if (empty($items)) { echo join(' ', $perms) . "<br />"; } 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); } } } $arr = array('peter', 'paul', 'mary'); pc_permute($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.0110.00416.25
8.3.50.0090.01222.78
8.3.40.0040.01118.67
8.3.30.0070.00719.08
8.3.20.0040.00420.34
8.3.10.0030.00523.65
8.3.00.0040.00417.63
8.2.180.0060.00918.16
8.2.170.0040.01122.96
8.2.160.0080.00520.38
8.2.150.0050.00224.18
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00021.11
8.2.110.0060.00320.17
8.2.100.0080.00417.97
8.2.90.0000.00819.34
8.2.80.0050.00317.97
8.2.70.0030.00517.59
8.2.60.0050.00318.16
8.2.50.0000.00918.07
8.2.40.0070.00018.28
8.2.30.0000.00818.18
8.2.20.0040.00417.74
8.2.10.0000.00718.06
8.2.00.0030.00617.65
8.1.280.0110.00325.92
8.1.270.0000.00823.67
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0030.00722.50
8.1.230.0110.00020.90
8.1.220.0040.00418.77
8.1.210.0050.00318.94
8.1.200.0070.00417.35
8.1.190.0080.00017.10
8.1.180.0050.00318.10
8.1.170.0040.00418.63
8.1.160.0000.00722.13
8.1.150.0040.00418.83
8.1.140.0070.00017.32
8.1.130.0070.00017.68
8.1.120.0050.00317.47
8.1.110.0070.00017.44
8.1.100.0000.00717.47
8.1.90.0040.00417.35
8.1.80.0040.00417.35
8.1.70.0030.00317.42
8.1.60.0040.00417.46
8.1.50.0000.00817.53
8.1.40.0000.00717.50
8.1.30.0040.00417.69
8.1.20.0020.00517.58
8.1.10.0000.00717.56
8.1.00.0040.00417.50
8.0.300.0000.00819.94
8.0.290.0080.00016.75
8.0.280.0000.00718.35
8.0.270.0030.00317.25
8.0.260.0050.00317.21
8.0.250.0070.00017.00
8.0.240.0000.00816.91
8.0.230.0000.00916.83
8.0.220.0070.00016.87
8.0.210.0050.00216.84
8.0.200.0030.00316.88
8.0.190.0050.00516.96
8.0.180.0040.00416.88
8.0.170.0040.00416.86
8.0.160.0040.00416.83
8.0.150.0000.00816.70
8.0.140.0040.00416.94
8.0.130.0030.00313.28
8.0.120.0070.00016.86
8.0.110.0050.00316.80
8.0.100.0080.00016.84
8.0.90.0000.00716.70
8.0.80.0050.01416.92
8.0.70.0030.00516.82
8.0.60.0040.00416.82
8.0.50.0000.00816.73
8.0.30.0100.01117.14
8.0.20.0100.00917.44
8.0.10.0080.00017.02
8.0.00.0060.01216.70
7.4.330.0000.00615.05
7.4.320.0060.00016.60
7.4.300.0000.00716.51
7.4.290.0000.00716.50
7.4.280.0070.00016.63
7.4.270.0000.00716.46
7.4.260.0070.00016.52
7.4.250.0050.00316.48
7.4.240.0020.00516.53
7.4.230.0030.00516.60
7.4.220.0170.00716.51
7.4.210.0070.00716.45
7.4.200.0000.00716.62
7.4.160.0080.00816.29
7.4.150.0100.00917.40
7.4.140.0100.01217.86
7.4.130.0120.00716.53
7.4.120.0070.01016.54
7.4.110.0070.01016.65
7.4.100.0150.00316.42
7.4.90.0060.01216.52
7.4.80.0110.00819.39
7.4.70.0110.01216.45
7.4.60.0090.00616.58
7.4.50.0080.00016.63
7.4.40.0100.00716.57
7.4.30.0060.00916.51
7.4.00.0100.00715.00
7.3.330.0030.00313.19
7.3.320.0030.00313.18
7.3.310.0030.00316.38
7.3.300.0070.00016.35
7.3.290.0060.01216.38
7.3.280.0060.01116.35
7.3.270.0170.00317.40
7.3.260.0130.00316.51
7.3.250.0110.00716.37
7.3.240.0090.01216.41
7.3.230.0070.01116.39
7.3.210.0060.01116.36
7.3.200.0140.00319.39
7.3.190.0040.01416.38
7.3.180.0060.01016.53
7.3.170.0040.01116.27
7.3.160.0120.00416.30
7.2.330.0090.00916.84
7.2.320.0100.00616.57
7.2.310.0070.01016.69
7.2.300.0090.00916.76
7.2.290.0030.01416.58
7.2.60.0030.01316.98
7.1.200.0030.00615.65
7.1.100.0040.00718.21
7.1.70.0000.00716.97
7.1.60.0060.01819.40
7.1.50.0140.00716.66
7.1.00.0000.08022.31
7.0.200.0000.00716.71
7.0.140.0100.06021.99
7.0.60.0000.08319.91
7.0.50.0070.08017.77
7.0.40.0000.06720.04
7.0.30.0230.08020.20
7.0.20.0130.04320.26
7.0.10.0130.05020.30
7.0.00.0000.04720.19
5.6.280.0000.07321.02
5.6.210.0100.07320.75
5.6.200.0070.05318.22
5.6.190.0030.08720.62
5.6.180.0230.08720.41
5.6.170.0200.05720.48
5.6.160.0000.08020.34
5.6.150.0100.07718.18
5.6.140.0130.06718.28
5.6.130.0070.08018.15
5.6.120.0100.03721.02
5.6.110.0030.09021.09
5.6.100.0030.08321.00
5.6.90.0070.09020.89
5.6.80.0030.07320.38
5.5.350.4330.03720.43
5.5.340.0100.07017.92
5.5.330.0100.07320.29
5.5.320.0230.07720.35
5.5.310.0130.04320.29
5.5.300.0030.07318.08
5.5.290.0070.04017.98
5.5.280.0130.07020.87
5.5.270.0030.06020.76
5.5.260.0070.06020.80
5.5.250.0000.04320.61
5.5.240.0000.08320.07
5.4.450.0670.07019.26
5.4.440.0700.05319.26
5.4.430.0570.05719.32
5.4.420.0730.04719.43
5.4.410.0100.05319.08
5.4.400.0070.05319.20
5.4.390.0830.06319.22
5.4.380.0070.05318.83
5.4.370.0070.05318.71
5.4.360.0130.05318.77
5.4.350.0080.04012.02
5.4.340.0070.06012.02
5.4.320.0080.04612.51
5.4.310.0120.03912.50
5.4.300.0070.03712.51
5.4.290.0120.04312.50
5.4.280.0080.03912.40
5.4.270.0060.04312.40
5.4.260.0070.04512.40
5.4.250.0100.03412.40
5.4.240.0070.03612.40
5.4.230.0050.03912.39
5.4.220.0060.03812.39
5.4.210.0060.03612.39
5.4.200.0060.03712.39
5.4.190.0070.05212.39
5.4.180.0050.03912.38
5.4.170.0100.03112.39
5.4.160.0130.02812.39
5.4.150.0070.03412.38
5.4.140.0020.04112.07
5.4.130.0070.03312.06
5.4.120.0050.03712.01
5.4.110.0040.04212.01
5.4.100.0060.03612.01
5.4.90.0060.03612.01
5.4.80.0040.03712.01
5.4.70.0050.04112.01
5.4.60.0050.03512.01
5.4.50.0060.03512.01
5.4.40.0050.03512.00
5.4.30.0110.03012.00
5.4.20.0050.03512.00
5.4.10.0050.03711.99
5.4.00.0090.04711.48
5.3.290.0070.03912.80
5.3.280.0060.04012.71
5.3.270.0080.03712.72
5.3.260.0080.03712.72
5.3.250.0080.03912.72
5.3.240.0100.03412.72
5.3.230.0030.04012.70
5.3.220.0040.04012.68
5.3.210.0050.04012.68
5.3.200.0090.03812.68
5.3.190.0080.03612.68
5.3.180.0080.03612.67
5.3.170.0070.04212.67
5.3.160.0080.03412.67
5.3.150.0110.03712.68
5.3.140.0080.03512.66
5.3.130.0080.03712.66
5.3.120.0030.04612.66
5.3.110.0060.03912.66
5.3.100.0060.03612.12
5.3.90.0050.03712.10
5.3.80.0060.03512.09
5.3.70.0050.03612.09
5.3.60.0030.04712.08
5.3.50.0050.03812.03
5.3.40.0030.04012.03
5.3.30.0070.03511.98
5.3.20.0100.03211.76
5.3.10.0060.04011.73
5.3.00.0090.03511.72
5.2.170.0070.0299.22
5.2.160.0040.0309.22
5.2.150.0070.0329.22
5.2.140.0060.0359.22
5.2.130.0050.0309.18
5.2.120.0060.0289.18
5.2.110.0110.0249.18
5.2.100.0040.0299.18
5.2.90.0060.0289.18
5.2.80.0090.0269.18
5.2.70.0040.0319.17
5.2.60.0100.0339.13
5.2.50.0060.0299.09
5.2.40.0030.0389.07
5.2.30.0030.0389.04
5.2.20.0040.0309.04
5.2.10.0030.0318.94
5.2.00.0060.0288.81
5.1.60.0070.0228.09
5.1.50.0060.0238.08
5.1.40.0070.0228.07
5.1.30.0070.0238.42
5.1.20.0040.0278.45
5.1.10.0040.0308.16
5.1.00.0050.0368.16
5.0.50.0040.0216.64
5.0.40.0040.0256.50
5.0.30.0010.0346.32
5.0.20.0060.0186.28
5.0.10.0040.0206.25
5.0.00.0040.0306.25
4.4.90.0020.0164.78
4.4.80.0040.0144.75
4.4.70.0030.0164.76
4.4.60.0030.0164.75
4.4.50.0030.0154.77
4.4.40.0030.0254.71
4.4.30.0030.0154.76
4.4.20.0020.0164.84
4.4.10.0040.0144.85
4.4.00.0030.0244.76
4.3.110.0020.0164.67
4.3.100.0010.0164.67
4.3.90.0010.0164.63
4.3.80.0030.0234.58
4.3.70.0020.0154.63
4.3.60.0010.0164.63
4.3.50.0000.0184.63
4.3.40.0020.0244.54
4.3.30.0020.0203.31
4.3.20.0030.0193.30
4.3.10.0000.0173.24
4.3.00.0170.0277.82

preferences:
47.51 ms | 401 KiB | 5 Q