3v4l.org

run code in 300+ PHP versions simultaneously
<?php $size=8; $path=[]; function danger($a,$b){ for($i=0;$i<count($path);$i++){ if($i==$a) return TRUE; elseif($path[i]==$b) return TRUE; elseif($i==$path[i]&&$a==$b) return TRUE; } return FALSE; } function move($row){ if($row>$size){ for($i=0;$i<count($path);$i++){ echo $path[i],' '; } echo '<br/>'; } else{ for($i=0;$i<size;$i++){ if(!danger($row,$i){ $path[$row-1]=$i; move($row+1); } } } } ?>

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)
5.4.320.3530.04319.20
5.4.310.3670.03319.14
5.4.300.3200.03718.87
5.4.290.2830.03719.00
5.4.280.0530.03719.22
5.4.270.0000.04019.00
5.4.260.0030.04318.99
5.4.250.0570.03719.17
5.4.240.3130.03719.24
5.4.230.3270.04019.19
5.4.220.3200.03719.14
5.4.210.2430.03718.86
5.4.200.3230.03719.34
5.4.190.3170.03718.94
5.4.180.3570.03718.86
5.4.170.2900.03719.21
5.4.160.2770.04018.85
5.4.150.2970.03719.29
5.4.140.2970.03316.34
5.4.130.3300.03716.55
5.4.120.3270.03316.38
5.4.110.3030.03316.33
5.4.100.3530.03716.42
5.4.90.2730.03016.50
5.4.80.3070.03716.39
5.4.70.2730.04316.43
5.4.60.1800.03716.56
5.4.50.1870.04316.43
5.4.40.2100.03316.51
5.4.30.2500.04016.25
5.4.20.2830.02716.42
5.4.10.2630.04016.55
5.4.00.2500.03315.90
5.3.290.2700.04014.52
5.3.280.2930.03714.45
5.3.270.0100.03314.45
5.3.260.0100.03014.54
5.3.250.0100.03714.55
5.3.240.1170.03314.62
5.3.230.4270.04314.59
5.3.220.3470.02714.43
5.3.210.3100.03314.42
5.3.200.3970.04314.44
5.3.190.3930.04314.45
5.3.180.3470.04014.39
5.3.170.4230.03714.43
5.3.160.3730.02314.42
5.3.150.3400.04314.55
5.3.140.3430.04314.41
5.3.130.3370.03314.39
5.3.120.3300.03314.39
5.3.110.3170.03314.50
5.3.100.3430.03713.87
5.3.90.3100.03313.98
5.3.80.3430.03313.96
5.3.70.3330.04013.93
5.3.60.3130.04313.95
5.3.50.3200.03313.82
5.3.40.3430.03713.79
5.3.30.3470.03713.85
5.3.20.3430.03713.47
5.3.10.3370.04013.63
5.3.00.3570.04013.62
5.2.170.2870.03011.00
5.2.160.3070.02710.98
5.2.150.2530.02311.16
5.2.140.2600.03011.00
5.2.130.2630.02710.93
5.2.120.2600.02710.96
5.2.110.2930.03011.26
5.2.100.2830.03310.96
5.2.90.3130.01710.99
5.2.80.3030.03011.04
5.2.70.2730.03311.11
5.2.60.2570.02311.22
5.2.50.2770.02711.11
5.2.40.2370.02710.85
5.2.30.2170.02711.05
5.2.20.2170.02711.01
5.2.10.2530.02710.80
5.2.00.2270.02010.79
5.1.60.2200.0209.91
5.1.50.2100.02710.11
5.1.40.2130.0239.96
5.1.30.2130.02310.31
5.1.20.2170.02310.43
5.1.10.2200.0179.93
5.1.00.2230.03010.12
5.0.50.1270.0208.41
5.0.40.1070.0208.45
5.0.30.1270.0338.20
5.0.20.1100.0208.17
5.0.10.0400.0138.21
5.0.00.1230.0338.24
4.4.90.1100.0136.55
4.4.80.1030.0176.55
4.4.70.1170.0236.55
4.4.60.1230.0136.55
4.4.50.0970.0106.55
4.4.40.1200.0236.55
4.4.30.1170.0176.55
4.4.20.1070.0136.55
4.4.10.1000.0206.55
4.4.00.1270.0306.55
4.3.110.1200.0136.55
4.3.100.1300.0176.55
4.3.90.1330.0206.55
4.3.80.0900.0376.55
4.3.70.1270.0176.55
4.3.60.1100.0136.55
4.3.50.1270.0106.55
4.3.40.1270.0206.55
4.3.30.0670.0276.55
4.3.20.0670.0136.55
4.3.10.0670.0276.55
4.3.00.0600.0176.55

preferences:
145.39 ms | 1394 KiB | 7 Q