Warning after PHP upgrade "Deprecated: Methods with the same name as their class..."
Issue
After upgrading PHP from 5.4 to 7.0 following warning is displayed:
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Pages has a deprecated constructor in /home4/webmaster/public_html/website/classes/pages.class.php on line 16
Resolution
The warning can be hidden by setting display_errors to Off in php.ini. Obviously this just hides the issue so a proper fix here is to fix the class in question.
Open the file mentioned in the warring message and find the constructor method. It should look something like this:
function Pages($id) { ... }