"which one is faster and lighter - mysqli & pdo" Code Answer


pdo vs. mysqli: which should you use?

both pdo and mysqli offer an object-oriented api, but mysqli also offers a procedural api – which makes it easier for newcomers to understand. if you are familiar with the native php mysql driver, you will find migration to the procedural mysqli interface much easier. on the other hand, once you master pdo, you can use it with any database you desire!

ultimately, pdo wins this battle with ease. with support for twelve different database drivers (eighteen different databases!) and named parameters, we can ignore the small performance loss, and get used to its api. from a security standpoint, both of them are safe as long as the developer uses them the way they are supposed to be used.

so if you’re still working with mysqli, maybe it’s time for a change!

pdo vs. mysqli: which should you use? - by dejan marjanovic

hope this helps .

By MysticMagic? on August 15 2022

Answers related to “which one is faster and lighter - mysqli & pdo”

Only authorized users can answer the Search term. Please sign in first, or register a free account.