That's a hell of a lot of temp's though! And is there really a lot of confusion? I mean in this day and age usually if you see a var without a prefix you can undoubtedly know that it is a temp var. And it looks so much neater!
PHP Code:
function levenshtein(s, t) {
temp.m = s.length();
temp.n = t.length();
temp.d = new[m][n];
for (temp.i = 0; i <= m; i++) d[i][0] = i;
for (temp.j = 0; j <= n; j++) d[0][j] = j;
for (temp.j = 1; j <= n; j++) {
for (temp.i = 1; i <= m; i++) {
if (s.charat(i-1) == t.charat(j-1)) {
d[i][j] = d[i-1][j-1];
} else {
d[i][j] = min(d[i-1][j] + 1,
min(d[i][j-1] + 1, d[i-1][j-1] + 1)
);
}
}
}
return d[m-1][n-1];
}