WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #20897, comment 7


Ignore:
Timestamp:
06/10/12 21:17:53 (23 months ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20897, comment 7

    initial v1  
    11Also, instead of  
    22 
    3 ` 
     3{{{ 
    44$extra_headers = array_combine( $extra_headers, $extra_headers ); 
    55 
     
    88 
    99$theme_data = array_merge( $extra_headers, $theme_data ); 
    10 ` 
     10}}} 
    1111 
    1212Would it be more efficient to use array_count_values over array_combine (I've never seen a performance comparison) like ... 
    1313 
    14 ` 
     14{{{ 
    1515$extra_headers = array_count_values( $extra_headers ); 
    1616 
     
    1919 
    2020$theme_data = array_merge( $extra_headers, $theme_data ); 
    21 ` 
     21}}} 
    2222 
    2323Or should we avoid having unset ones merged in to the $theme_data by ... 
    2424 
    2525 
    26 ` 
     26{{{ 
    2727$fetched_extra_headers = array(); 
    2828 
     
    3232 
    3333$theme_data = array_merge( $fetched_extra_headers, $theme_data );  
    34 ` 
     34}}}