function printSumm($x, $y) { $summ = getSumm($x, $y); echo "Сумма {$x} и {$y} равна {$summ}<br/>"; }
function recurse($draw, $note = false) { global $summr; global $steps; $fill = fill($draw, $note); if (in_array($fill, $steps)) { // echo "fail"; return false; } recordStep($fill); if (getSumm($fill) == $summr) { // echo "done"; return $fill; } $note = getLowestNote($fill); $fill = deriveOneNote($fill, $note); return recurse($fill, $note, 3); }