A general route to coat poly(cyclotriphosphazene-co-4,4'-sulfonyldiphenol) on various substrates and the derived N, P, S-doped hollow carbon shells for catalysis.