I don't think an anonymous function is a substitute for a for loop, nor do I think it's necessary to replace for loops with them.
What it is useful for is a callback. Take this for example:
(yes, it is a lame bubble sort, but it is an example)
<?php
function bubble_sort($sort_rule, $elements) {
do {
$swapped = false;
for ($i = 0; $i < count($elements) - 1; $i++) {
if ($sort_rule($elements[$i], $elements[$i + 1])) {
$elements[$i] ^= $elements[$i + 1];
$elements[$i + 1] ^= $elements[$i];
$elements[$i] ^= $elements[$i + 1];
$swapped = true;
}
}
} while($swapped);
return $elements;
}
print_r(bubble_sort(function ($a, $b) { if ($a > $b) return true; else return false; }
,array(1,6,3,7,42,-1,0,6)));
?>
Closures aren't a replacement for for loops in a procedural programming language like php. Sure if you're using lisp or scheme they are, but that's out of necessity.
You can write them that way, all you'll really be doing is creating an anonymous function with a for loop inside it. I think recursion would just be unnecessary if the task is just as easily accomplished with a for loop, and therefore you're not kissing for loops good bye.
Anonymous functions are very useful in event driven programming as well, when you want to just define a callback method really quick.