As you did not describe what server/hosting environment you use, I can only guess that you've changed (or "changed") php version in cPanel, but you forgot to hit "save" so that change actually comes into effect. In the cPanel console you will have "Current PHP version: x.y.z" so make sure that it really is 7.x as you said.