It's not a great solution, but there are drop in libraries that shim the old mysql_* functions to their mysqli_* equivalents.
https://github.com/dshafik/php7-mysql-shim
It won't be 100% perfect and it's definitely not something I'd want to use long term, but it can help with the initial migration to PHP 7.
Came here to say the same. I've used them long-term on legacy codebases and they work great for allowing new development to move onto modern PHP.
While I'm using https://github.com/dshafik/php7-mysql-shim, another to look at is https://github.com/mattbit/mysql-compat
Thanks for the suggestions, but my problem remains : who's gonna pay me to do this :-)
It's mainly what prevents me to migrate them by myself. It's a lot of work and no one wants to pay for it.
So it remains on a VM and if it brokes, they were alerted it could happen.
In addition to the shim and compat libs recommended, I've had decent luck with the converter tool (https://github.com/philip/MySQLConverterTool). It goes a bit out of its way to be compatible so one function call can get expanded into a global var + function call.
phpcs + PHPCompatibility ruleset is pretty good about finding issues as well.
Some of them are more than 10 years old !
And as they represents a good share of my profits, I can’t dump them.
I think I saw a Joomla 1.5.
Those clients don’t want to pay someone to upgrade or redo their site.
There are several intranets that will not support PHP 7 because they use the old mysql_ functions...
So even I loose a lot of my semi-passive incomes, or I continue to tell them on a regular base that they should upgrade.
(For the anecdote, there were around 40 websites before I alerted my clients in April. 5 of them have migrate to last versions of Wordpress or joomla. 35 more to go...)