Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8308315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:46:21+00:00 2026-06-08T18:46:21+00:00

Disclaimer: this question is strictly about mysql and database abstraction layers that support it.

  • 0

Disclaimer: this question is strictly about mysql and database abstraction layers that support it.

The PHP website notes that using the mysql_ functions of PHP is highlighy discouraged. It instead encourages developers to use PDO or MySQLi.

Here’s my question: in regards to mysql, under all the abstraction, are PDO and MySQLi just being a safer, more object-oriented wrapper for the mysql_ functions?

And if that’s true, aren’t frameworks like CodeIgniter and Symfony creating an unnecessary amount of wrappage by putting a layer on top of MySQLi which would then put a layer on top of native PHP mysql_?

If it isn’t true, I want to know why an experienced developer is discouraged from using mysql_ and what PDO and MySQLi actually do under the abstraction.

(Also, please don’t tell me to go look at the code) Will give +100 bounty.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:46:22+00:00Added an answer on June 8, 2026 at 6:46 pm

    Here’s my question: in regards to mysql, under all the abstraction, are PDO and MySQLi just being a safer, more object-oriented wrapper for the mysql_ functions?

    No. Like xdazz said, both MySQLi and PDO are implemented in C, which means they don’t just wrap the mysql_* functions.

    And if that’s true, aren’t frameworks like CodeIgniter and Symfony creating an unnecessary amount of wrappage by putting a layer on top of MySQLi which would then put a layer on top of native PHP mysql_?

    There’s another reason to consider: CodeIgniter and Symfony probably created an interface over the default interface, because the default interface isn’t usable enough (from their point of view). I myself have written a layer over PDO which sets some default settings (such as error-mode, as PDO is quiet by default) and makes a more intuitive API altogether. PDO is a very decent piece of software, but the setAttribute( $attr, $value ) just isn’t my cup of tea, really.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Disclaimer: This question is strictly academic. The example I'm about to give is probably
Disclaimer, I'm not a PHP programmer, so you might find this question trivial. That's
Disclaimer This is not a question about whether we should be escaping for database
Disclaimer: this is not a question about how to install asp.net or an application
Disclaimer When I wrote this question I was wrong about the behavior of the
Disclaimer This is not strictly a programming question, but most programmers soon or later
Disclaimer: This question is not about fixing visual studio So, I've used VSS for
Disclaimer: This is a follow-on question from my other question about NServiceBus which was
I will preface this question with the disclaimer that I know there are many
This is a philosophical question, actually. It's been a year I'm programming using PHP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.