i , j are the indices of the current cell and prev is the character processed in the parent call . . also mat [ i ] [ j ] is our current character .
function getLenUtil ( $ mat , $ i , $ j , $ prev ) { global $ x , $ y , $ dp ;