A nonlinear oscillator with an abruptly inhomogeneous restoring force driven by an uniform oscillating force exhibits stochastic properties under specific resonance conditions. This behaviour elucidates the elementary mechanism of the electron energization in the strong electromagnetic wave interaction with thin targets.