Changing php version messes code


I just switched host . And they as default had pr default set the php version to # 7, and that caused a banner to display code instead of the media. With my previous host the php version was set to 5.6, and I had the option to do so here, and i did and it has its banner again.
I have attached two screenshots of with each diffrent version php

My question is, will i benifit of going up to higher version??

php 7: