[wp-trac] Re: [WordPress Trac] #3141: explicit memory check before starting install

WordPress Trac wp-trac at lists.automattic.com
Mon Dec 31 00:26:47 GMT 2007


#3141: explicit memory check before starting install
-------------------------------------+--------------------------------------
 Reporter:  looksaus                 |        Owner:  ffemtcj 
     Type:  defect                   |       Status:  assigned
 Priority:  normal                   |    Milestone:  2.4     
Component:  Administration           |      Version:  2.1     
 Severity:  normal                   |   Resolution:          
 Keywords:  has-patch needs-testing  |  
-------------------------------------+--------------------------------------
Comment (by DD32):

 Replying to [comment:27 darkdragon]:
 > It appears that I was thinking of {{{size_format()}}} which does the
 inverse of what I was thinking of. A new function would have to be
 created, which does the inverse of {{{size_format()}}}.

 As the memory limit is allways a MB figure, you can simply cast it to int:

 {{{
 echo (int) '32M'; //Prints 32
 }}}

 Replying to [comment:26 darkdragon]:
 > Also, as an aside, you won't be able to use memory get_usage() since you
 have to support PHP 4.2.0 and memory_get_usage() was added in PHP 4.3.2.
 As a complete aside, It hasnt stopped 4.3+ functions elsewhere: #5416

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


More information about the wp-trac mailing list