We are planning to upgrade our code base from PHP5 to PHP 7.
I understand that mysql_*
functions are deprecated in php 7. So do we have to rewrite all our
Well, you better clear that mess up first
We are planning to upgrade our code base from PHP5 to PHP 7.
Are you talking of the "codebase"? What so you mean? May be you want to change the version of PHP you are running on your servers?
I understand that mysql_* functions are deprecated in php 7.
You understand it wrong. It was deprecated somewhere in 5.5 and removed in 7.
So do we have to rewrite all our code in mysqli_* or pdo?
Didn't you say that you wanted to change the codebase? If so, what's the problem with rewriting the codebase in order to change it?
Is there any alternative for this?
Well yes, there are. But there is little point in all of them.
If not, which one would you suggest between mysqli_* and pdo?
We would recommend PDO, if you still going to use API functions right in the code without any intermediate wrapper.