Home  »  ArticlesProgrammingTechnology   »   It’s Time to Stop Using the mysql Extension Functions in PHP

It’s Time to Stop Using the mysql Extension Functions in PHP

No, really! You need to stop using the MySQL extension functions in PHP. That goes out to the web developers who are still using or maintaining code bases that make use of this extension.

There are several compelling reasons not to use this extension and this guide should be what settles this once and for all.

Reasons to Stop Using the PHP MySQL Extensions

  • For starters, the MySQL extension is no longer under active development and it hasn’t been for over 5 years now. So how long?
  • The extension was officially deprecated as of PHP 5.5. This version of PHP was released in June 2013.
  • Things got worse. As of PHP 7.0 it has been entirely removed.
  • There is no support for prepared statements making it less secure and vulnerable to attacks.
  • Still, on security, it does not support the new password authentication method which was turned on by default in MySQL 5.6 and required in MySQL 5.7. It is also important to note that MySQL 8.0 introduces yet another new password authentication method not discussed here.
  • It also does not support all of the functionality that came in in MySQL 5.1.
  • It lacks an Object-Oriented interface.
  • The extension does not support non-blocking, asynchronous queries.
  • It does not support transactions, nor stored procedures.
  • It keeps getting worse. The MySQL extension functions do not support multiple statements.

I’m sure those should be compelling reasons to get you off using the MySQL extension functions in your current and new projects.

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.

Available under:
Articles, Programming, Technology