You can skip the 3.1 and 3.3 steps...I would upgrade php to 5.6.5 or later, upgrade to 3.2, then upgrade php to 7.2 and then go to 3.7.
The initial php upgrade is just a simple apt-get upgrade. The switch to 7.2 is a little more involved but not bad.
The initial php upgrade is just a simple apt-get upgrade. The switch to 7.2 is a little more involved but not bad.