PHP7 Compatibility library

This is a library to provide PHP5 functions that are no longer available in PHP7. This provides common mysql_ functions, ereg and split. So there's no need to go into your code and replace those functions. Just include this file. You'll still have to replace calls to preg_replace with the 'e' modifier with preg_replace_e, which includes an eval, so it's better to rewrite the regular expression, but this is for quick fixes on old code. I recommend php7cc for checking the website initially. I created this while working at Powered by Humans.

1. Download the file php7compatibility.php
Save the file php7compatibility.php somewhere on your computer.

2. Include it in all files
If all the files in your website already include a PHP file (for example for database connection details) then put php7compatibility.php in the same folder and include it with a line like below. The __DIR__ makes sure it will include correctly from all places:

include_once __DIR__ . "/php7compatibility.php";