Ho sbagliato non è $restVia = substr($via, 7);
ma $restVia = substr($via, 6);