title: replace php mysql to mysqli in a large codebase?
body: <p>We know that the other drivers are depreciated and from php7 its recommended to use <code>mysqli</code> methods. The problem is i came across codebase from a long time ago from one of my employer and he wants that updated.</p>
  
  <p>Now there are around 3K files and the previous developer did a great job at putting in 3-5 <code>mysql_query</code> calls in almost every file. How would you recommend updating all of them at once, maybe some kind of method overide trick if someone has had the same issue in future.</p>
  
  <p>Currently i am working with 2 vim macros that find <code>mysql_</code> keyword and replace with <code>mysqli_</code> and the other one which adds <code>$con</code> as first parameter to the method <code>mysqli_connect</code>.</p>
  
  <p>Even with this automation, i still need to open all files individually. Any better hack is appreciated that would prevent me from opening all the files manually and making changes.</p>