A recursive function to replace previous value ' prevV ' at ' ( x , ▁ y ) ' and all surrounding values of ( x , y ) with new value ' newV ' .
function floodFillUtil ( & $ mat , $ x , $ y , $ prevV , $ newV ) {