I have developed an open source PHP application and currently it uses both the MySQLi or MySQL extension for backwards compatibility. I'm wondering about switching it over to only be compatible with MySQLi since PHP now no longer supports the MySQL. Another reason I'd like to get away from supporting both MySQL and MySQLi is that I'm basically using MySQLi the same way I do as with the old MySQL extension. Can anyone explain to me if this is a good or bad idea?
Is it safe to just use MySQLi?
php;mysql;backward compatibility;compatibility
If you are going to switch anyway, you should really consider going with PDO instead of MySQLi. The main benefit, would be that your application would be able to work with any of the 11 other database backends supported by PDO, with minimal fuss. This might not be a priority for you, but since this is an open source application there's little reason to not try and make it as flexible as possible. Also, you'd be able to use named parameters in your prepared statements (MySQLi supports prepared statements, but not named parameters).In any case, moving away from the mysql_* functions is a very good idea. These days, it's just a relic of the (dark) past, and unless backwards compatibility is an inescapable requirement there's absolutely no reason to use it. 