[wp-trac] [WordPress Trac] #14889: Memory Comparison Broken / WordPress Memory Limit

WordPress Trac wp-trac at lists.automattic.com
Wed Jun 8 12:58:06 UTC 2011


#14889: Memory Comparison Broken / WordPress Memory Limit
-----------------------------------------------+---------------------------
 Reporter:  hakre                              |       Owner:
     Type:  defect (bug)                       |      Status:  new
 Priority:  normal                             |   Milestone:  Future
Component:  General                            |  Release
 Severity:  normal                             |     Version:  3.0
 Keywords:  has-patch 3.2-early needs-testing  |  Resolution:
-----------------------------------------------+---------------------------

Comment (by hakre):

 If someone is in for a speed test, I'm just curious how this expression
 perfoms:

 {{{
 function wp_convert_hr_to_bytes( $size ) {
         ( $bytes = (float) $size )
                 && ( $last = strtolower( substr( $size, -1 ) ) )
                 && ( $pos = strpos( ' kmg', $last , 1) )
                 && $bytes = round( $bytes * pow( 1024, $pos ) )
                 ;
         return $bytes;
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14889#comment:28>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list