3v4l.org

run code in 300+ PHP versions simultaneously
<?php $letters = array( array("a", "b", "c", "d", "e","1"), array("f", "g", "h", "i", "j","2"), array("k", "l", "m", "n", "o","3"), array("p", "r", "q", "s", "t","4"), array("u", "v", "w", "x", "y","5"), array("z", "0", "9", "8", "7","6")); $neighbour =array(-1, 0, 1); $say=1; for($x[1] = 0; $x[1] < count($letters); ++$x[1]) { for($y[1] = 0; $y[1] < count($letters[$x[1]]); ++$y[1]) { $say++; foreach ($neighbour as $neigh){ $x[2]=$x[1]+$neigh; if ($x[2]>-1 AND $x[2]<count($letters) ) { foreach ($neighbour as $neigh){ $y[2]=$y[1]+$neigh; if ($y[2]>-1 AND $y[2]<count($letters[$x[2]])) { if ($x[2] != $x[1] OR $y[2] != $y[1]){ $say++; foreach ($neighbour as $neigh){ $x[3]=$x[2]+$neigh; if ($x[3]>-1 AND $x[3]<count($letters) ) { foreach ($neighbour as $neigh){ $y[3]=$y[2]+$neigh; if ($y[3]>-1 AND $y[3]<count($letters[$x[3]])) { if ($x[3] != $x[1] OR $y[3] != $y[1]){ if ($x[3] != $x[2] OR $y[3] != $y[2]){ $say++; foreach ($neighbour as $neigh){ $x[4]=$x[3]+$neigh; if ($x[4]>-1 AND $x[4]<count($letters) ) { foreach ($neighbour as $neigh){ $y[4]=$y[3]+$neigh; if ($y[4]>-1 AND $y[4]<count($letters[$x[4]])) { if ($x[4] != $x[1] OR $y[4] != $y[1]){ if ($x[4] != $x[2] OR $y[4] != $y[2]){ if ($x[4] != $x[3] OR $y[4] != $y[3]){ $say++; foreach ($neighbour as $neigh){ $x[5]=$x[4]+$neigh; if ($x[5]>-1 AND $x[5]<count($letters) ) { foreach ($neighbour as $neigh){ $y[5]=$y[4]+$neigh; if ($y[5]>-1 AND $y[5]<count($letters[$x[5]])) { if ($x[5] != $x[1] OR $y[5] != $y[1]){ if ($x[5] != $x[2] OR $y[5] != $y[2]){ if ($x[5] != $x[3] OR $y[5] != $y[3]){ if ($x[5] != $x[4] OR $y[5] != $y[4]){ $say++; foreach ($neighbour as $neigh){ $x[6]=$x[5]+$neigh; if ($x[6]>-1 AND $x[6]<count($letters) ) { foreach ($neighbour as $neigh){ $y[6]=$y[5]+$neigh; if ($y[6]>-1 AND $y[6]<count($letters[$x[6]])) { if ($x[6] != $x[1] OR $y[6] != $y[1]){ if ($x[6] != $x[2] OR $y[6] != $y[2]){ if ($x[6] != $x[3] OR $y[6] != $y[3]){ if ($x[6] != $x[4] OR $y[6] != $y[4]){ if ($x[6] != $x[5] OR $y[6] != $y[5]){ $say++; foreach ($neighbour as $neigh){ $x[7]=$x[6]+$neigh; if ($x[7]>-1 AND $x[7]<count($letters) ) { foreach ($neighbour as $neigh){ $y[7]=$y[6]+$neigh; if ($y[7]>-1 AND $y[7]<count($letters[$x[7]])) { if ($x[7] != $x[1] OR $y[7] != $y[1]){ if ($x[7] != $x[2] OR $y[7] != $y[2]){ if ($x[7] != $x[3] OR $y[7] != $y[3]){ if ($x[7] != $x[4] OR $y[7] != $y[4]){ if ($x[7] != $x[5] OR $y[7] != $y[5]){ if ($x[7] != $x[6] OR $y[7] != $y[6]){ $say++; }}}}}}}}}} }}}}}}}}} }}}}}}}} }}}}}}} }}}}}} }}}}} }} echo $say; ?>

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.0130.36116.75
8.3.50.0130.38617.42
8.3.40.0070.39018.96
8.3.30.0130.49319.02
8.3.20.0000.21519.03
8.3.10.0030.22320.53
8.3.00.0070.19519.33
8.2.180.0130.36816.75
8.2.170.0100.37522.96
8.2.160.0130.36520.61
8.2.150.0130.22624.18
8.2.140.0070.22424.66
8.2.130.0070.22026.16
8.2.120.0070.21120.88
8.2.110.0070.37520.94
8.2.100.0100.32218.03
8.2.90.0000.36419.55
8.2.80.0030.30519.53
8.2.70.0000.33617.63
8.2.60.0000.32218.16
8.2.50.0070.31818.07
8.2.40.0070.31418.28
8.2.30.0070.32318.29
8.2.20.0030.32317.75
8.2.10.0000.32318.01
8.2.00.0070.32617.91
8.1.280.0130.35325.92
8.1.270.0030.20224.66
8.1.260.0030.20026.35
8.1.250.0070.20328.09
8.1.240.0030.37622.61
8.1.230.0070.30121.15
8.1.220.0070.32917.78
8.1.210.0030.35618.97
8.1.200.0070.32417.47
8.1.190.0030.33117.66
8.1.180.0030.32318.10
8.1.170.0030.32218.97
8.1.160.0000.34019.04
8.1.150.0030.32518.72
8.1.140.0000.31917.68
8.1.130.0000.31417.91
8.1.120.0030.32517.60
8.1.110.0000.33517.55
8.1.100.0100.31517.62
8.1.90.0000.33417.66
8.1.80.0030.30717.67
8.1.70.0030.32617.59
8.1.60.0030.40417.62
8.1.50.0030.40417.64
8.1.40.0070.39617.57
8.1.30.0130.39017.76
8.1.20.0030.40217.85
8.1.10.0000.40417.70
8.1.00.0030.40017.58
8.0.300.0000.35620.16
8.0.290.0030.33716.75
8.0.280.0000.34218.59
8.0.270.0000.34517.36
8.0.260.0070.33816.97
8.0.250.0030.33217.15
8.0.240.0030.34216.99
8.0.230.0000.35017.08
8.0.220.0030.32816.92
8.0.210.0000.34217.05
8.0.200.0060.39217.15
8.0.190.0100.39517.05
8.0.180.0030.40016.95
8.0.170.0070.42717.04
8.0.160.0030.39717.11
8.0.150.0030.40116.98
8.0.140.0100.41117.09
8.0.130.0030.43713.39
8.0.120.0030.40616.98
8.0.110.0030.40616.98
8.0.100.0000.40917.15
8.0.90.0030.40116.99
8.0.80.0060.71817.07
8.0.70.0070.40717.11
8.0.60.0000.41417.01
8.0.50.0100.39716.91
8.0.30.0130.53116.90
8.0.20.0210.54917.38
8.0.10.0030.40217.17
8.0.00.0110.54116.72
7.4.330.0030.34313.16
7.4.320.0030.39916.77
7.4.300.0000.33516.57
7.4.290.0030.39816.77
7.4.280.0070.39816.66
7.4.270.0030.40216.62
7.4.260.0030.39913.43
7.4.250.0030.41216.66
7.4.240.0100.40016.82
7.4.230.0070.39416.55
7.4.220.0100.71816.79
7.4.210.0160.64216.75
7.4.200.0100.39816.64
7.4.190.0000.41616.64
7.4.160.0100.60216.84
7.4.150.0160.56616.77
7.4.140.0200.59616.58
7.4.130.0140.74216.63
7.4.120.0080.60216.73
7.4.110.0100.61716.50
7.4.100.0100.58816.74
7.4.90.0130.58516.71
7.4.80.0100.76319.39
7.4.70.0130.59716.72
7.4.60.0230.57616.55
7.4.50.0100.31416.69
7.4.40.0070.65016.65
7.4.30.0100.55716.63
7.4.00.0030.76515.23
7.3.330.0000.41813.36
7.3.320.0000.43713.32
7.3.310.0030.40916.36
7.3.300.0000.40716.39
7.3.290.0030.58116.46
7.3.280.0170.63916.49
7.3.270.0070.73316.51
7.3.260.0100.59816.82
7.3.250.0160.61616.68
7.3.240.0100.59016.71
7.3.230.0130.62416.41
7.3.210.0130.71616.48
7.3.200.0170.60116.49
7.3.190.0100.70316.66
7.3.180.0130.56516.77
7.3.170.0120.61016.68
7.3.160.0070.57816.59
7.3.120.0070.66314.94
7.3.110.0000.87614.76
7.3.100.0000.83114.83
7.3.90.0030.71814.80
7.3.80.0100.63015.32
7.3.70.0030.80514.90
7.3.60.0000.83515.04
7.3.50.0000.65815.05
7.3.40.0130.64515.12
7.3.30.0030.86614.94
7.3.20.0070.69616.74
7.3.10.0100.72516.50
7.3.00.0030.76816.82
7.2.330.0210.78816.76
7.2.320.0160.68316.55
7.2.310.0190.85116.81
7.2.300.0160.70016.85
7.2.290.0130.59716.94
7.2.250.0130.66915.23
7.2.240.0130.91115.19
7.2.230.0070.65015.29
7.2.220.0030.76915.53
7.2.210.0030.65115.47
7.2.200.0100.85115.39
7.2.190.0070.87515.00
7.2.180.0070.73015.04
7.2.170.0030.75015.36
7.2.00.0070.36619.46
7.1.330.0031.17915.71
7.1.320.0101.00215.55
7.1.310.0031.28015.94
7.1.300.0071.18716.00
7.1.290.0071.19716.01
7.1.280.0071.08715.62
7.1.270.0031.14515.98
7.1.260.0071.03915.83
7.1.100.0660.43816.28
7.1.70.0000.40717.13
7.1.60.0070.40319.40
7.1.50.0000.43417.02
7.0.200.0170.48415.16

preferences:
48.8 ms | 401 KiB | 5 Q