Yes maybe. You just need to keep the correct order.
class database extends mysqli implements databaseInterface { ... }
In addition, a class can implement more than one interface. Just separate them with commas.
However, I feel obligated to warn you that extending the mysqli class is an incredibly bad idea . Inheritance as such is probably the most overrated and misused concept in object-oriented programming.
Instead, I would recommend using db-related things with mysqli (or PDO).
Plus, secondary, but naming conventions matter. Your database class seems more general than mysqli , so it assumes the latter inherits from database , and not vice versa.
MichaΕ Rudnicki Mar 16 '09 at 21:14 2009-03-16 21:14
source share