On billiard solutions of nonlinear PDEs