Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQLi -- OO or Procedural?

Tags:

php

mysqli

I know OO is the "way to go" but I'm thinking procedural might be easier to use in the wrapper I'm making.

Any difference in performance between MySQLi Object Oriented vs Procedural?

like image 259
Kerry Jones Avatar asked Nov 26 '25 21:11

Kerry Jones


2 Answers

This is premature optimization. There's no difference, unless you're really crunching for picoseconds and femtoseconds.

Edit: which you will NOT be crunching.

like image 57
Lotus Notes Avatar answered Nov 28 '25 09:11

Lotus Notes


Not really. There might be a very slight difference, but it's largely negligible. The object-oriented one is, in my opinion, much easier to use, though, even if you are making a wrapper over it anyway.

like image 27
Sasha Chedygov Avatar answered Nov 28 '25 11:11

Sasha Chedygov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!