Changes between Initial Version and Version 1 of Ticket #18230, comment 3
- Timestamp:
- 07/24/2011 09:00:07 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #18230, comment 3
initial v1 1 1 Using isset instead of is_object is a little bit faster apparently. 2 2 {{{ 3 function new _wp_list_pluck( $list, $field ) {3 function new1_wp_list_pluck( $list, $field ) { 4 4 foreach ( $list as $key => $value ) { 5 5 if ( isset( $value->$field ) ) $list[$key] = $value->$field; … … 10 10 } 11 11 }}} 12 A simple test with 27 terms. 13 {{{ 14 float(0.71514010429382) // old_wp_list_pluck 15 float(0.33222508430481) // new_wp_list_pluck 16 float(0.26003003120422) // new1_wp_list_pluck 17 }}}