3v4l.org

run code in 300+ PHP versions simultaneously
<?php $in = 8; $count = 0; function trace($x, $y, $z, $steps) { global $count; if ($steps == 0) { if ($x == 0 && $y == 0 && $z == 0) { $count++; } return; } for($i = $x-1; $i <= $x+1; $i++) { for($j = $y-1; $j <= $y+1; $j++) { for($k = $z-1; $k <= $z+1; $k++) { if ( array_sum(array($i, $j, $k)) !== 0 || ($i == $x && $j == $y && $k == $z) ) { continue; } trace($i, $j, $k, $steps-1); } } } } trace(0, 0, 0, $in); echo $count;

Abusive script

This script was stopped while abusing our resources


preferences:
24.03 ms | 404 KiB | 5 Q