WordPress Testing – Efficient way of using Array

Following question arises we had a testing session in wordpress core,

Which is the efficient way of using the wpdb class objects outputs in wordpress?

Example,
Getting wp users table name,

$wpdb->tables('all')['users']

(or)

$wpdb->users

In both of the above ways we can get the users table name, Why developers are preferring $wpdb->users more than $wpdb->tables('all')['users'],

Is there any specific reason in the efficiency and how can we test this out?

Read more here: WordPress Testing – Efficient way of using Array

Leave a Reply

Your email address will not be published. Required fields are marked *