3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = range('a', 'g'); function permute($items, $perms = array( )) { if (empty($items)) { var_dump($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); permute($newitems, $newperms); } } } permute($items);

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.0210.02516.38
8.3.50.0350.01217.26
8.3.40.0350.01018.72
8.3.30.0330.00018.71
8.3.20.0070.01018.60
8.3.10.0130.00320.41
8.3.00.0310.01419.38
8.2.180.0400.01316.50
8.2.170.0320.01622.96
8.2.160.0510.01622.07
8.2.150.0330.00024.18
8.2.140.0220.00424.66
8.2.130.0130.00026.16
8.2.120.0350.01019.76
8.2.110.0100.01021.99
8.2.100.0190.01517.91
8.2.90.0090.00317.75
8.2.80.0090.00518.66
8.2.70.0210.00017.63
8.2.60.0120.00017.50
8.2.50.0070.00717.63
8.2.40.0200.00017.62
8.2.30.0090.00317.82
8.2.20.0130.00617.84
8.2.10.0070.00717.87
8.2.00.0120.00317.82
8.1.280.0330.00725.92
8.1.270.0170.00324.66
8.1.260.0210.00326.35
8.1.250.0150.00628.09
8.1.240.0190.00623.98
8.1.230.0130.02019.16
8.1.220.0140.00017.79
8.1.210.0120.00618.77
8.1.200.0110.00417.23
8.1.190.0130.00317.23
8.1.180.0030.01018.10
8.1.170.0060.01417.62
8.1.160.0050.02018.97
8.1.150.0060.00618.62
8.1.140.0080.01117.43
8.1.130.0060.00617.86
8.1.120.0040.01217.41
8.1.110.0070.00417.55
8.1.100.0080.00417.54
8.1.90.0070.00717.52
8.1.80.0030.01017.48
8.1.70.0130.00017.48
8.1.60.0100.00717.68
8.1.50.0070.01017.55
8.1.40.0100.00317.50
8.1.30.0150.00417.66
8.1.20.0060.00917.68
8.1.10.0100.00717.56
8.1.00.0110.00417.47
8.0.300.0100.01018.77
8.0.290.0160.00316.58
8.0.280.0040.01117.92
8.0.270.0140.00017.84
8.0.260.0070.00716.71
8.0.250.0080.01116.82
8.0.240.0110.00416.76
8.0.230.0100.00316.87
8.0.220.0090.00916.78
8.0.210.0060.00616.67
8.0.200.0080.00416.85
8.0.190.0040.00716.67
8.0.180.0180.00016.79
8.0.170.0060.00916.77
8.0.160.0120.00316.75
8.0.150.0150.00316.70
8.0.140.0070.00716.75
8.0.130.0040.00413.32
8.0.120.0100.00716.82
8.0.110.0110.00416.65
8.0.100.0130.00016.83
8.0.90.0000.01316.67
8.0.80.0140.03916.76
8.0.70.0030.01016.67
8.0.60.0070.00716.80
8.0.50.0110.00316.89
8.0.30.0730.04016.96
8.0.20.0590.04216.91
8.0.10.0070.01116.91
8.0.00.0730.02116.69
7.4.330.0110.00013.05
7.4.320.0080.00816.36
7.4.300.0080.00416.46
7.4.290.0070.00716.25
7.4.280.0110.00516.39
7.4.270.0030.00916.43
7.4.260.0080.00413.28
7.4.250.0070.00716.43
7.4.240.0070.00316.41
7.4.230.0080.00816.42
7.4.220.0040.00816.48
7.4.210.0240.02916.43
7.4.200.0120.00416.30
7.4.190.0130.00016.63
7.4.160.0630.02816.50
7.4.150.0540.03816.55
7.4.140.0640.03816.42
7.4.130.0620.04516.36
7.4.120.0510.04216.39
7.4.110.0360.02016.42
7.4.100.0930.02416.32
7.4.90.0360.02616.39
7.4.80.0440.03819.39
7.4.70.0880.04616.29
7.4.60.0430.03416.46
7.4.50.0160.00316.26
7.4.40.0100.01316.23
7.4.30.0810.03416.45
7.3.330.0100.00713.21
7.3.320.0110.00413.15
7.3.310.0070.00716.32
7.3.300.0100.00616.12
7.3.290.0250.02916.29
7.3.280.0220.02616.27
7.3.270.0630.03016.29
7.3.260.0480.03616.43
7.3.250.0620.03216.23
7.3.240.0690.02216.21
7.3.230.0580.03816.16
7.3.210.0710.04416.48
7.3.200.0640.01716.37
7.3.190.0650.03516.50
7.3.180.0360.01916.25
7.3.170.0320.01016.46
7.3.160.0760.03516.35
7.2.330.0860.03716.47
7.2.320.0540.02616.60
7.2.310.0480.03416.79
7.2.300.0830.03816.41
7.2.290.0710.03116.73
7.2.100.0990.01814.33
7.2.90.0940.01114.71
7.2.80.1210.01214.61
7.2.70.0920.02614.94
7.2.60.0340.01414.56
7.2.50.0720.01514.76
7.2.40.1040.01314.29
7.2.30.0720.01615.13
7.2.20.1780.01814.81
7.2.10.0710.00914.92
7.2.00.0990.01514.68
7.1.220.0700.02013.72
7.1.210.0690.01113.85
7.1.200.1500.02313.61
7.1.190.0990.01413.61
7.1.180.1650.01813.84
7.1.170.1440.02613.66
7.1.160.0630.01513.96
7.1.150.0990.00713.81
7.1.140.0900.02014.01
7.1.130.0700.00714.00
7.1.120.1020.01313.73
7.1.110.0380.02213.83
7.1.100.0830.00913.82
7.1.90.0930.00813.89
7.1.80.0280.01413.61
7.1.70.0770.02613.91
7.1.60.0500.01832.19
7.1.50.1160.02531.74
7.1.40.0560.02032.23
7.1.30.2170.03231.78
7.1.20.1180.01732.09
7.1.10.0290.02013.83
7.1.00.0980.01513.89
7.0.310.0510.01013.61
7.0.300.0770.01313.61
7.0.290.1370.02013.61
7.0.280.1110.01313.61
7.0.270.0690.02013.61
7.0.260.1170.01113.66
7.0.250.0870.02213.61
7.0.240.0540.02613.65
7.0.230.0410.00613.61
7.0.220.0910.00713.61
7.0.210.0590.00913.61
7.0.200.0830.02213.61
7.0.190.1000.01213.73
7.0.180.0760.01813.61
7.0.170.0930.01713.65
7.0.160.0940.01013.77
7.0.150.0970.00313.61
7.0.140.0450.01913.62
7.0.130.0300.02413.61
7.0.120.1580.01613.61
7.0.110.0370.02113.61
7.0.100.0730.01713.61
7.0.90.0890.01313.61
7.0.80.1070.01513.61
7.0.70.0240.01813.61
7.0.60.0700.01413.61
7.0.50.1430.01713.61
7.0.40.0560.02013.61
7.0.30.0850.01213.61
7.0.20.1420.01913.61
7.0.10.0990.00713.61
7.0.00.1510.01913.61
5.6.380.0290.02114.20
5.6.370.0280.00914.23
5.6.360.0410.01613.96
5.6.350.0300.03314.57
5.6.340.0500.01114.56
5.6.330.0420.01314.53
5.6.320.0190.01914.15
5.6.310.0250.02214.35
5.6.300.0300.01814.24
5.6.290.0360.00914.59
5.6.280.0450.01914.35
5.6.270.0250.03713.99
5.6.260.0200.02013.90
5.6.250.0320.00414.13
5.6.240.0320.02014.09
5.6.230.0140.02113.79
5.6.220.0220.02414.05
5.6.210.0320.01213.77
5.6.200.0280.01614.16
5.6.190.0250.02214.23
5.6.180.0340.02114.03
5.6.170.0200.02013.72
5.6.160.0190.01413.96
5.6.150.0660.00013.68
5.6.140.0340.01814.16
5.6.130.0430.02214.50
5.6.120.0180.01814.33
5.6.110.0350.01614.06
5.6.100.0370.02014.07
5.6.90.0380.01614.23
5.6.80.0220.01314.36
5.6.70.0300.01514.18
5.6.60.0420.01914.26
5.6.50.0310.01914.25
5.6.40.0440.01014.15
5.6.30.0350.01814.42
5.6.20.0310.01813.88
5.6.10.0360.01414.30
5.6.00.0280.01214.19
5.5.380.0260.02313.61
5.5.370.0380.01713.61
5.5.360.0350.01813.61
5.5.350.0200.00313.61
5.5.340.0500.02013.61
5.5.330.0200.02313.61
5.5.320.0260.02213.61
5.5.310.0210.01413.61
5.5.300.0360.02013.61
5.5.290.0160.01613.61
5.5.280.0410.01613.61
5.5.270.0180.01213.61
5.5.260.0360.02113.61
5.5.250.0180.02413.61
5.5.240.0390.00913.61
5.5.230.0180.01913.61
5.5.220.0190.00913.61
5.5.210.0480.01113.61
5.5.200.0250.03313.61
5.5.190.0320.01413.61
5.5.180.0240.01613.61
5.5.170.0440.02914.43
5.5.160.0260.02313.61
5.5.150.0300.01513.61
5.4.450.0320.01813.61
5.4.440.0200.03613.61
5.4.430.0410.01213.61
5.4.420.0220.02213.61
5.4.410.0260.01213.61
5.4.400.0450.01413.61
5.4.390.0410.01113.61
5.4.380.0440.01713.61
5.4.370.0270.01713.61
5.4.360.0380.01813.61
5.4.350.0160.01613.61
5.4.340.0390.01813.61
5.4.330.0270.02213.61
5.4.320.0210.01713.61
5.3.290.0360.03113.61

preferences:
45.05 ms | 400 KiB | 5 Q