Why are many databases in the source code not using the object method?

Source: Internet
Author: User
That means using Fetch_object ().


Reply to discussion (solution)

There's a lot of reason.

1. Efficiency problem fetch_object Efficiency is the lowest you can refer to the image below the x axis is the number of data Y axis is the time spent


The operation of the 2.PHP array is particularly special and convenient for various arrays operation functions as for the object hehe

3.fetch_object data is not compliant with object-oriented thinking (because the member property is all public) and does not conform to process-oriented (because it is an object)

There's a lot of reason.

1. Efficiency problem fetch_object Efficiency is the lowest you can refer to the image below the x axis is the number of data Y axis is the time spent


The operation of the 2.PHP array is particularly special and convenient for various arrays operation functions as for the object hehe

3.fetch_object data is not compliant with object-oriented thinking (because the member property is all public) and does not conform to process-oriented (because it is an object)



As you say, it is a chicken!
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.